Select to view content in your preferred language

Editing an existing survey in Survey123 app on a phone when launched from Dashboard

1368
7
Jump to solution
09-12-2023 07:22 AM
ChipMorgan65
Occasional Contributor

Hi,

   I've been using URL parameters from a dashboard to launch the web version of Survey 123. This allows me to view, edit, or copy surveys. It's extremely useful on a desktop/laptop environment. This approach does work with Dashboard on our phones. It launches the mobile browser and edit/copy functions work as expected.

   However, I'd like to keep folks in the field using the Survey 123 app and not the web version of Survey 123. 

   I'm using the open=native URL parameter to trigger Survey 123 to be opened in the Survey 123 app. Unfortunately, this somehow breaks the other URL parameters (specifically globalid) so that when the user lands in the Survey 123 app, they are presented with a new survey and not the one that they are supposed to be editing. 

   Are there any workarounds for this, or any I just doing it wrong?

url="https://survey123.arcgis.com/share/"+surveyid+"?mode=edit&open=native&globalId="+$feature.globalid

0 Kudos
1 Solution

Accepted Solutions
ChipMorgan65
Occasional Contributor

All,

   I just ran across this post, talking about the use of the q:queryparameter option.

https://community.esri.com/t5/arcgis-survey123-questions/q-queryparameter-url-parameter-for-survey12...

The solution recommended this approach:

https://survey123.arcgis.app?itemID=<item ID>&action=edit&q:where=ws_stationnumber=5171&update=true

 

I have confirmed that having the survey enable the Inbox is not necessary to make this work, but apparently update=true IS necessary. 

View solution in original post

7 Replies
VanessaSimps
Occasional Contributor III

are both the survey in your dashboard and the survey url you shared in the question the same? meaning are they both set to use the app and not the web site? 

0 Kudos
ChipMorgan65
Occasional Contributor

Vanessa,

   Yes, correct.

    From what I can tell, the dashboard URL opens the survey in the browser and then some magic tells the system to launch the Survey 123 app from the browser. I suspect that during this intermediate step the URL parameters get lost. 

Chip

0 Kudos
Vinzafy
Occasional Contributor

Hey there!

There are two types of URLs you can use when launching S123 - one to launch that triggers the web version, and one to launch that triggers the S123 app. The one you presented above as a sample is the one to launch the web version.

Web Version URL

https://survey123.arcgis.com/share/<item id>?<extra parameter>&<additional parameters>

Survey123 App URL

https://survey123.arcgis.app/?itemID=<item id>&<additional parameters>

E.g.,

https://survey123.arcgis.app/?itemID=<item id>&field:parentglobalid=<parent GUID>

Documentation here:

Integrate with other apps 

Hope that helps!

0 Kudos
ChipMorgan65
Occasional Contributor

@Vinzafy, this helps a lot! 

Survey 123’s app launches directly, which is awesome. It wants to look at the Inbox, which is unexpected. I turned on the Inbox temporarily to practice. 

I’m trying to specify the globalid so I can load the specify survey for editing. I followed your example of 

&field:parentglobalid=<parent GUID>

without really knowing whether it would work for me. It doesn’t appear to, but I’m probably doing something else wrong. 

At present, I’m just getting dumped in the Inbox folder in the app and not in the collection mode of the app.

I’m open to more suggestions.

Thanks,

   Chip 

 

0 Kudos
Vinzafy
Occasional Contributor

Glad I was able to help! Interesting that it dumps you in the inbox. Are you able to share your full URL (sans unique identifiers)?

Regarding setting up the URL for editing, to do so, you have to add one additional parameter:

mode=edit

Then after that, you can call the GUID. If you're trying to edit a related record, as long as there's only one relate for the parent, you could call the parentGUID, otherwise if there are multiple related records to a parent, you'd have to call the specific GUID of the desired related record.

0 Kudos
ChipMorgan65
Occasional Contributor

OK, I'm making some more progress. According to the doc that @Vinzafy shared (thanks again!), I think I need to use the q: option, particularly since they had the globalid example. I'm still missing something, though.

q:queryparameter

Queries the feature layer for an existing record. It can be used to retrieve content that is not on the device.

q:where=ws_stationnumber=5171

q:where=waterbodytype='Lake'

q:globalId=1d392670-33e2-456d-8435-7fad3abd8bb9

String

0 Kudos
ChipMorgan65
Occasional Contributor

All,

   I just ran across this post, talking about the use of the q:queryparameter option.

https://community.esri.com/t5/arcgis-survey123-questions/q-queryparameter-url-parameter-for-survey12...

The solution recommended this approach:

https://survey123.arcgis.app?itemID=<item ID>&action=edit&q:where=ws_stationnumber=5171&update=true

 

I have confirmed that having the survey enable the Inbox is not necessary to make this work, but apparently update=true IS necessary.