Hello,
We are trying to setup a custom url scheme to link to a survey in Survey123 from Collector in Portal version 10.4.1. The hyperlink works perfectly from the webmap. When trying to use the hyperlink from Collector, we get an error that the frame load is interrupted. We copied the hyperlink url from Collector and it appeared that it was missing 'arcgis-survey123' from the hyperlink.
Has anyone experienced this behavior before?
Thanks so much,
Brittney
Hi Brittney,
As a security precaution, the Map Viewer sanitizes hyperlinks to values it knows are safe when saving the map. The 10.4.1 version of Portal is not aware of the app URL schemes, so is removing the arcgis-survey123 component. You can manually set the URL outside of the Map Viewer using tools like ArcGIS Online Assistant or GEO Jobe Admin Tools for ArcGIS Online.
Thanks very much, James. We thought this might be the case and will try the solutions you proposed.
Hi James - I am able to change the value of the hyperlink and add arcgis-survey123 back to the hyperlink and save however; if I close and get back into AGO Assistant and view the json the value has been removed again.
Hi Bryson,
Yes, this is a downside of using this as a solution- the map cannot be edited afterwards without needing to reapply the change.
Hi James Tedrick,
I tried editing the JSON from AGO assistant. But, it still satitises the WebMap URL not to include arcgis-survey123://?.
Even though I didn't edit the WebMap afterwards.
Is there another way to go about opening Survey123 from a WebMap using 10.4.1?
Thanks,
Gee
Hi Gee,
In that case, it may not be possible - I had thought the URL validation was in the map viewer's handling of the pop-up information.
Hi James,
I actually got this to work by pasting in the custom URL as plain text (not the prettiest solution). And when opening using the latest version of Collector on an iOS device it recognizes the text string to be a hyperlink.
But this technique will not work if you try to pass an attribute that has a SPACE in it.
For example the attribute ADDRESS may have spaces in its results. As a result the URL will break at that point.
Thanks for the help.
Gee
Hi Gee,
A space (as well as other special characters) would need to be URL encoded. Take a look at string - URL encoding in python - Stack Overflow for options in python.