Is there any way to pass info from Survey123 Web form to another Web form using a custom URL? I am trying o launch a second survey from a first if certain conditions are met (in my case, if a member of the public is reporting a fish kill and red tide is suspected as the cause). I can open the second survey from a URL, but I cannot pass the custom ID from the first survey to the second. I have tried every option of "field: <field name>=<value> that I can think of, with/without "{}", with/without "${}", replacing the symbols with %<hexdec>. The only value that comes across is the code used to try and identify the column in the <value> part of the URL.
Any help is greatly appreciated,
Chris Anderson
Florida Fish and Wildlife Conservation Commission
field:SecondarySurveyID=KillCounty
field:SecondarySurveyID="KillCounty"
field:SecondarySurveyID={KillCounty}
field:SecondarySurveyID=%{KillCounty}
field:SecondarySurveyID=%24{KillCounty}
field:SecondarySurveyID=%24%28KillCounty%29
Can you share the URL (you can censor out the id numbers if you need to)? I assume you're having the form assemble the URL?
Here are some of the various versions I have tried:
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID={KillCounty}
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID=’{KillCounty}’
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID=${KillCounty}
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID=’${KillCounty}’
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID=%24KillCounty%25
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID={KillCounty}
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID= ${KillCounty}
Is there any way to pass info from Survey123 Web form to another Web form using a custom URL
Yes.
Are there special characters your string? That would cut off your text. You can try passing a simple hard-coded "123" into a field to see if that works.
I just tossed together a test URL for a webform and it worked as expected. This was my format:
https://survey123.arcgis.com/share/<Your Survey ID>?portalUrl=<Your Portal URL with adaptor>&field:<Second S123 field name>=<First S123 field name>
So for example, if I had this info:
I'd have: https://survey123.arcgis.com/share/b137efc58c2f485ea3ea01c869a36209?portalUrl=https://s123.company.com/portal&field:destination_field=source_field
Another way to look at this, which is simpler, is to go to the Survey123 Website, locate your survey, go to the "Collaborate" tab, and copy the string there (imaged below). They, just add &field:destination_field=source_field to the end
Here's the URL parameters for launching the web app. https://doc.arcgis.com/en/survey123/get-started/integrate-launchwebapp.htm
So, if KillCounty is the value you are trying to bring in, your link would be:
https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID=KillCounty
If KillCounty is a field name that you want a value pulled from, you will want to concatenate the link in a hidden calculate field. Then have the display field populate from the hidden field, that should remove any URL issues with it misinterpreting what the ${fieldname} extras mean in the URL.
hidden field calc: concat('https://survey123.arcgis.com/share/xyzxyzx?field:SecondarySurveyID=', ${KillCounty})
display field: ${hidden field calc}
You might need to use the portalURL parameter too to get it to work.
concat('https://survey123.arcgis.com/share/xyzxyzx?portalURL=https://myorg.arcgis.com&field:SecondarySurveyID=', ${KillCounty})
and if you want to keep people from bypassing the survey and going to the second one, you want to encode the URL parameters by adding &encodeURLParams=true to the URL