Select to view content in your preferred language

Best way to redirect to new app

5836
4
Jump to solution
01-30-2019 01:56 PM
JeffThomasILM
Frequent Contributor

If I'm designing a new map or app to replace an old one, I don't want to simply delete the old one that many people have bookmarked. I also don't want them to continue using the old one, intentionally or not. As determined here, you cannot swap out one item for another using the same URL. Alternatively, I'd like to repurpose the old app's URL into a redirection notice. What is the best way to that? I could put a link to the new app in a splash widget (if it's possible to edit the app - see below), but that still allows the user to dismiss the notice and continue using the old app. (This is the best hack I could come up with: http://bit.ly/AGOLRedirectHack.) I could delete or disrupt the functionality of the map the app points to, but that isn't particularly elegant. (And there are probably some bookmarks pointing directly to the map rather than the app, which is another whole issue.) It would be nice if AGOL had some sort of built-in redirection method that notifies the user of the new app and makes the old app inaccessible. Marking the old app as deprecated could trigger this capability. Currently, deprecating an item does absolutely nothing to inform someone who arrives directly at the app (never having seen the item details page) about its status. For that matter, this functionality should exist for any kind of item in AGOL.

Why would you need to create a whole new map or app rather than simply updating the old one? I can think of at least 2 scenarios:

1. The old app is so old or was originally made in whatever manner that there's no option to edit it through AGOL. (that is the problem I'm currently facing)

2. You want to develop and test a new app over a long period of time before making it live. Once it's ready, you'll swap out the old for the new.

The second scenario especially seems like something that would be commonly desired, yet AGOL doesn't provide an easy way to accomplish. Unless I'm missing something, which is what I'm trying to figure out. Else, this post probably ought to be changed into a feature request. Thank you for any insight!

Tags (2)
1 Solution

Accepted Solutions
JeffThomasILM
Frequent Contributor

Looks this idea has already been submitted: https://community.esri.com/ideas/12157 

Well over 2 years ago and not too many upvotes. Please add your vote if you'd like to see this!

View solution in original post

4 Replies
AdamEversole1
Esri Contributor

Hey Jeff, 

Just to be sure Im understanding. You have two apps ArcGIS online App1 and App2,  Keep the URL for App 1 But have it open App 2 as it is your replacement. 

Firstly, I think your Hack is really smart, and it makes it obvious you have a new and improved application out and think users would appreciate that foresight to redirect us to the latest and greatest. 

To continue the discussion, You can actually redirect an Items URL in a Web Appbuilder application. But note its not the same as the actual application URL,

Item URL - https://arcgis.com/home/item.html?id=89a5515ae38947698f2bc5b816d01f4d 

App URL -  https://arcgis.com/apps/webappviewer/index.html?id=89a5515ae38947698f2bc5b816d01f4d 

If you wanted to redirect the Item, you can,  see the documented for URL, Ya, It's a bit vague, so be very careful doing this, I strongly suggest running the following test before applying it to any production applications. 

1) In ArcGIS online, create a new Web AppBuilder application named Version1

- Note the URL for the Item and its ID

2) Create another New Web AppBuilder application named Version2

- Note the URL for the Item and its ID

3) Open The Item Details for Version 1,  Visit the Settings

4) Scroll down and look for Data Source. Note the App URL. Also note this can be updated with a different link

5) Update the Version 1 App URL with the Version 2 App URL, and Save

When you use Item, this will Open Version 2 instead of version 1, but note the Version 1 App Url will remain unaffected.

Honestly you hack is best thing i've seen. I've also not seen any Ideas posted asking for the ability to update an ArcGIS online Item with replacement item, It might also be worth while to post this to Ideas.

Hope this helps.

- Adam

JeffThomasILM
Frequent Contributor

Glad you like my hack. Yes, you are understanding correctly what I'm wanting to do. And I think I understand what you're saying about changing the item URL. It's just another way of swapping out the map used in a particular app. Unfortunately, that's not what I need in this situation. I want to change the app itself beyond what is possible without simply creating a new app and therefore new URL. 

Update on my scenario 1 above: I can edit the app now, after being granted admin rights. The app was originally created by someone else and ownership was transferred to me, but apparently ownership doesn't give me editing rights. I don't understand why that is, but regardless, that problem is solved. The next problem is, there are very few things that can be edited. Notably, the template does not have the option to add a splash screen, so I can't use the hack I devised. And of course, you can't change the template without creating a whole new app and URL. (You do have the option of switching themes if the app was built with Web AppBuilder, but this app was not.) So, I'm stuck unless the redirect functionality I've described here is implemented by Esri. I will post that idea to the Ideas section. Thanks!

AdamEversole1
Esri Contributor

Thanks Jeff!  I look forward to seeing the Idea!  -Adam

0 Kudos
JeffThomasILM
Frequent Contributor

Looks this idea has already been submitted: https://community.esri.com/ideas/12157 

Well over 2 years ago and not too many upvotes. Please add your vote if you'd like to see this!