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...
Hello,
Do you have an example of how to construct the URL to pass the "find" value (i.e. address string) from zone lookup, that then auto-populates the address in a text Survey123 question?
Thanks
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?
Hi Kelly,
Do you know if the {find} results (e.g. an address) from Zone Lookup can be pushed automatically to a Survey123 form, inputting the address in a question so the user doesn't have to type it once in Zone Lookup and then again in Survey123? Thanks.
Do you want to display a link someplace in the app that users can click and open the survey?
Hi Kelly,
Yes. The link takes them to a web survey123 form and auto-populates a text question using the {find} value from the zone lookup app. Since yesterday I actually got this to mostly work, except my Survey123 text question is populated like this" "find= 123 main street....". So, the only part I'm missing is how to remove the "find=" part of the string from the Survey123 question.
zone lookup: user enters address/clicks map
a survey hyperlink appears that navigates them to survey123 web form. The expression I use for the link is this: <a href="https://survey123.arcgis.com/share/8d9375aa2dcd44d697ec06923ef089d6?field:property_address={find}">Open survey</a>
The {find} address transfers to my Survey123 question, however "find=" is carried along with it:
Hopefully this is a simple fix!
Unfortunately there isn't an approach right now that lets you remove the find= portion of the value on the instant app side. Not sure about the Survey 123 side.
In the next release of ArcGIS Online due out later this year you can use findParam instead of find in your url link and it will insert just the value not the find= portion .
Thanks, Kelly. Good to know about the upcoming release of AGOL.