Auto Calculate Survey123 from Related Table for Web Map Use

893
4
02-01-2022 04:39 PM
janderson_ksninc
Occasional Contributor

My GIS team is building an inspection app based on a feature layer with a related table that houses the submission results from Survey123. I have created a link to the survey in the popup window that populates the Inspection ID field in the survey based on the Inspection ID field in the feature layer:

arcgis-survey123://?itemID=xxxxxxxxxx&field:Inspection_ID={INSPECT_ID}&field:GUID={GlobalID}

This works perfect when using the Field Maps app from a mobile device; however, when I try to access the same link from my desktop, I get a blank page. 

Is there a way to do the same thing (create a link in the popup window of the webmap that opens Survey123 with the Inspection ID pre-populated) but from the desktop? So far, I can create a link that opens Survey123 from my desktop but the Inspection ID field is blank. Is there an Arcade/Python solution to this or is there another to accomplish this that I'm not thinking of? Any help with this would be greatly appreciated!

0 Kudos
4 Replies
HeatherBell
Occasional Contributor

Hi @janderson_ksninc

I think this will work for you configure it into the pop up of the web map.

https://survey123.arcgis.com/share/itemID?mode=edit&globalId={globalid}

Replace the itemID with your actual item ID. Leave the '?' in the text above as this is setting the URL parameter. If it doesn't work this blog post should help too: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-editing-records-in...

Hope this helps. 

Best wishes,

Heather.

GIS Analyst @ The Rivers Trust
janderson_ksninc
Occasional Contributor

Hi Heather, 

Thanks for responding! I got it to work by using your code with a minor adjustment:

https://survey123.arcgis.com/share/itemID?&field:Inspection_ID={INSPECT_ID}

Basically, I took out the "mode=edit&field:globalId={globalID}" part of the code as I kept getting an error telling me that I wasn't providing a globalID parameter. I was adding the globalID (or at least I thought I was) but kept getting the error saying that I wasn't. I researched and found that the parameter was case-sensitive but when I changed it to lower case, it was still causing the error. As a "last-ditch" attempt, I removed the "mode=edit&field:globalId={globalID}" portion of the string and it worked. Thanks for pointing me in the right direction!!

HeatherBell
Occasional Contributor

Hi @janderson_ksninc , 

Glad it helped as a pointer. Does this mean people can still edit the form when following that URL that you are using?

Thank you, 

Heather. 

GIS Analyst @ The Rivers Trust
0 Kudos
janderson_ksninc
Occasional Contributor

Hi Heather, 

Yes, I am still able to fill out and submit the survey. I just can't edit the Inspection ID which is what I want in this particular case. 

Thanks again for pointing me in the right direction!