Select to view content in your preferred language

Survey 123 Web URL Parameters not property filling in survey123 form

136
1
11-20-2024 01:44 PM
SRock
by
New Contributor

Good afternoon, I am setting up a survey for our annual stormwater outfall inspection for compliance with the state and I am for the first time trying to use Survey123.  I have a web map with the outfall feature layer.  My goal is for an inspector to have this web map up in the field, click the nearest outfall point feature, and then click a URL field to navigate to the survey to complete the form for the outfall inspection.  I tried to follow this guide, LINK , to have the URL auto complete the outfall feature ID in the survey as well as center the map on the specific feature in the survey.  However, when I set up my URL with the parameters it simply returns the name of the structure ID field, instead of the actual unique structure Id value.  Also, the center command with a Lat and Lon value always goes to the 0,0 coordinates instead of the actual location.  I have checked the Lat and Lon fields I created for the outfalls feature class and they are completed properly with no blank lat & lon values.  This is the schema I am following for my URL, any idea what is going wrong?

https://survey123.arcgis.com/share/xyzx?field:StrNum={PWID_Storm_Structure}&center={Lat},{Lon}

The 4 X's are where my surveyId would be

StrNum is the field in the survey I want to populate with the outfall ID number

PWID_Storm_Structure is the field name for the outfall ID in my outfall feature class

Lat & Lon are a decimal latitude and longitude float fields in my outfall feature class

Here is the URL I tried to do to open the android app, it gives me the same issue

arcgis-survey123://?itemID=xyzx&field:StrNum={PWID_Storm_Structure}&center={Lat},{Lon}

 

I've attached a screenshot showing what happens when I click the link, as you can see it simply fills the field with the name of the field instead of the value.  Thanks in advance!

0 Kudos
1 Reply
ChristopherCounsell
MVP Regular Contributor

and then click a URL field to navigate to the survey to complete the form for the outfall inspection.

If you have a URL field with the literal string value of:

arcgis-survey123://?itemID=xyzx&field:StrNum={PWID_Storm_Structure}&center={Lat},{Lon}

This will be what you are pasting into the browser URL and why you are seeing the text string '{PWID_Storm_Structure}' passed through.

If you add {fieldname} to a pop-up text element, the map will take the value from the current feature pop-up and display it. 

https://doc.arcgis.com/en/survey123/get-started/integrate-launchfieldapp.htm#ESRI_SECTION1_302393BC2...

So you should:

  1. Add a text element to the pop-up
  2. add the text 'click here'
  3. Select the text and click add a link URL
  4. Enter what you've come up with into the link URL and the pop-up will translate the {fieldvalues}

Personally I prefer using an Arcade expression to string them together and use the {expression/expr0} as the link value.