Select to view content in your preferred language

Cross-App URLs being Renamed in Web Maps

2818
10
Jump to solution
06-07-2021 07:51 AM
JCGuarneri
Frequent Contributor

Bit of a head scratcher here. I'm trying to configure a custom app url to invoke activity in Cityworks Mobile. I'm configuring the URL per Cityworks' documentation, and the link works if I open it in a browser on the mobile device. However, it does nothing in Collector, Field Maps, or Explorer. After some digging, I confirmed that it was configured correctly and passing all the correct information when I set up the popup in the map in Portal, but when that map is reloaded, the url is changed. The URL I setup is:

cityworks9://createWorkActivity....
 
After a reload, it's changed to:
 
#createWorkActivity....
 

I suspect the link Collector, etc, see is the latter one, which would explain why it doesn't react like a link.

I have a similar link setup to connect to Survey123 in several maps, and I have not encountered this issue before. Is there some kind of setting that I'm missing on the Portal end to allow the Cityworks url to stick?

 

Edit: I've also discovered this is an issue in ArcGIS Online, so it's clearly not tied to my environment or to the Enterprise version.

0 Kudos
5 Solutions

Accepted Solutions
JCGuarneri
Frequent Contributor

I've found the solution to my own problem. Using Arcade, I was able to build the custom URL that way and return it as text in a popup field. From there, I simply had to pass that value into the Hyperlink function in a custom attribute display. It returns the correct link when you click on it, in desktop and mobile, and I was successfully able to launch the Cityworks mobile app.

View solution in original post

m3
by
Frequent Contributor

I tried this and it did the same behavior, do you have a sample you could post please?


View solution in original post

0 Kudos
m3
by
Frequent Contributor

To be clear, what I mean is I tried Arcade and the URL I composed got changed in the popup to # so I need help with formatting the URL in Arcade

View solution in original post

0 Kudos
m3
by
Frequent Contributor

That doesn't work for me, it changes it to # 

View solution in original post

0 Kudos
m3
by
Frequent Contributor

We're on 10 something.  But it doesn't work for me on regular AGOL either

View solution in original post

0 Kudos
10 Replies
JCGuarneri
Frequent Contributor

I've been working with Esri tech support; no solution yet.

I have discovered that other urls in this format get renamed, such as ms-outlook://compose to open Outlook gets changed to #compose on refresh. If I enter as the "URL" random dictionary words with no # / : etc, such as "taco", the URL doesn't get changed. All the Esri ecosystem URLS are unaffected, so clearly there's some way that Portal knows those URLs are OK. I need to find a way to let Portal know that my third-party URLs are OK.

0 Kudos
JCGuarneri
Frequent Contributor

The official take from Esri support is that this is out of scope for support, since it's a URL to open a third party application. I'd agree if the case was that the the link failed to open the third-party app, but the issue is the link is getting modified by the Esri platform. Very disappointed.

0 Kudos
JCGuarneri
Frequent Contributor

I've found the solution to my own problem. Using Arcade, I was able to build the custom URL that way and return it as text in a popup field. From there, I simply had to pass that value into the Hyperlink function in a custom attribute display. It returns the correct link when you click on it, in desktop and mobile, and I was successfully able to launch the Cityworks mobile app.

m3
by
Frequent Contributor

I tried this and it did the same behavior, do you have a sample you could post please?


0 Kudos
m3
by
Frequent Contributor

To be clear, what I mean is I tried Arcade and the URL I composed got changed in the popup to # so I need help with formatting the URL in Arcade

0 Kudos
JCGuarneri
Frequent Contributor

This is the sum total of my code to accomplish this for Cityworks. My one gripe is that I have to change the version number for each version of the Cityworks app, but that's on Cityworks' end. This particular bit of code is for inspections. You can do the same thing with work orders, work requests, etc, by changing the workActivityType parameter.

 

var baseURL = "cityworks11://openWorkActivity?workActivityType=2&workActivityId=";
var inspectionID = $feature["INSPECTIONID"];
return baseURL + inspectionID;

 

 

m3
by
Frequent Contributor

That doesn't work for me, it changes it to # 

0 Kudos
CortWilson
Frequent Contributor

THANKS FOR THIS!  I've been banging my head for a few days dealing with the same issue you had.  Your arcade script worked great.

JCGuarneri
Frequent Contributor

What version of Enterprise are you using? It definitely works for me in Enterprise 11, with maps authored in either map viewer, but maybe I'll be in trouble if I upgrade too fast!

0 Kudos