Hello ESRI community!
I am working on creating a zone lookup instant app where a customer inputs their address and the app returns a popup with a survey123 link if found in the appropriate zone. I was wondering if there was a way to pass the location information from the instant app and into the survey automatically so that a customer does not have to input their address twice, once in the app and once in the survey. Any direction on accomplishing this would be greatly appreciated. Thank you!
You can build a URL including the address and pass it to the survey, as documented here...
The Zone Lookup app displays the popup information that you define in your web map. So you could probably write an arcade expression that constructs the necessary url with location information (lat,lon) appended.
Alternatively we also have an undocumented option in the Zone Lookup app where you can add a link to the custom text that can appear before results, after results or when no results are found. Using these steps you can add a link to those text areas that can open up a url with either the find or center url parameters appended.
<a href="https://www.arcgis.com/apps/instant/nearby/index.html?appid=705b775322e2400b9ebcaf8e2820e759&{center}" target="_blank">Link to app center</a>
In the example above the crucial bit is the {center} value. The {center} placeholder will be replaced with the map's center point. You can use find the same way by specifying {find}.
Note that in the example above we add center to the url by adding an ampersand in front of it. This is needed to ensure the parameter is added to the url. In this example we use & because the url already has a first url param added via the question mark. The "operators" section of this article explains when to use ? vs & if you aren't familiar with these options.
Currently we support these placeholder options:
We do plan to offer a better configuration experience for these in a future release so any feedback on options you'd like to see supported is appreciated.
Hi Kelly, thank you for the insight! Unfortunately I don't think I will be able to use the custom text that appears before the results, as I only want this survey link to appear for specific results rather than any and all results.
I have tested creating a custom arcade expression that has a dynamic url, but believe I am struggling with writing it correctly. I see documentation on how to push the lat lon from a point feature that is selected to a survey, but I would like the URL to pull the lat lon of the address someone inputs from the geolocator, if that is possible. Do you have any additional insight on how to write this or what I may be doing wrong?
Unfortunately I do not know Arcade all that well. But perhaps someone in the Arcade space in Esri Community can help?