Select to view content in your preferred language

Survey 123 Web URL Parameters not property filling in survey123 form

415
5
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!

5 Replies
ChristopherCounsell
MVP Frequent 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.

 

apgis16
Regular Contributor

I did what you suggested and now I can see that it's only pulling in part of the field which is weird. They're both text fields and have 255 limit. There aren't any constraints or anything in the xlsx. If I click on a feature with a label with "OBS #402", it brings over "OBS". If I click on a feature that has #406 in the LABEL field, nothing is pulled in the survey for the Outfall_ID

apgis16_0-1755699246258.png

 

The link is arcgis-survey123://?itemID=xyz&field:Outfall_ID={LABEL}

 

0 Kudos
ChristopherCounsell
MVP Frequent Contributor

You need to encode your URL. The # key is causing issues. It's possible with arcade in the pop-up.

https://community.esri.com/t5/arcgis-survey123-questions/integrating-s123-and-fieldmaps-with-an-url-...

apgis16
Regular Contributor

Thanks Christopher! I finally figured that out shortly after posting my comment  😊

ChristopherCounsell
MVP Frequent Contributor

Thanks @apgis16 . If your question has been addressed can you please mark the answers that helped as the solution. 
Cheers, Chris

0 Kudos