Struggling with mode=edit in URL parameters for portal Survey123

4089
12
Jump to solution
04-15-2021 08:10 AM
ShelleySchulte1
Occasional Contributor

Hello all,

I am trying to create a basic line in a web app and then apply attributes via Survey123.  Basically I draw a line in the web app, then I use the URL link in the feature pop up to link to the survey.  It will pull up a new survey, but it is not pulling up the associated link I just drew.

 

In my most recent test  I can see the field name in the address bar but it is not populating the form.

https://survey123.arcgis.com/share/2b3a0468698c4d76805b0e13d506e0f5&field:mainline=cp?portalUrl=http...

Any insight would be appreciated, thanks!

Shelley

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

That would be for editing existing features with a survey, which sounds like what you're aiming for.

When you use mode=edit, you've got to give the survey a way to find the feature in question, so you'll need to use an additional parameter. As of a recent update, Survey123 needs to reference the globalID of the feature, not the objectID.

Stick "&mode=edit&globalId={globalid}" on the end of that URL from before, that should do it.

See this page for more info about editing existing features through a survey if you hit any speed bumps.

- Josh Carlson
Kendall County GIS

View solution in original post

12 Replies
jcarlson
MVP Esteemed Contributor

What's the popup URL look like, the same as you posted?

Make sure you use brackets, since you're accessing an attribute.

Also, the first URL parameter comes after the "?", and successive parameters use "&", so you might re-write it like this:

survey-url?portalUrl=<your-url>&field:mainline={mainline}

- Josh Carlson
Kendall County GIS
0 Kudos
ShelleySchulte1
Occasional Contributor

Thank you, I will try that!  Also, do I need to have mode=edit in the URL?

0 Kudos
jcarlson
MVP Esteemed Contributor

That would be for editing existing features with a survey, which sounds like what you're aiming for.

When you use mode=edit, you've got to give the survey a way to find the feature in question, so you'll need to use an additional parameter. As of a recent update, Survey123 needs to reference the globalID of the feature, not the objectID.

Stick "&mode=edit&globalId={globalid}" on the end of that URL from before, that should do it.

See this page for more info about editing existing features through a survey if you hit any speed bumps.

- Josh Carlson
Kendall County GIS
ShelleySchulte1
Occasional Contributor

Yes, i have referenced that page a lot but I still can't get it to work.

This is what i'm trying now

arcgis-survey123://?itemID=2b3a0468698c4d76805b0e13d506e0f5&mode=edit&globalId={globalid}&field:mainline={mainline}

0 Kudos
ShelleySchulte1
Occasional Contributor
0 Kudos
ShelleySchulte1
Occasional Contributor

I have finally figured it out!  Thanks to your help and a bit of digging on YouTube. Thanks!

DanielDery
Occasional Contributor

Hi, 

What was your solution ? From a custom popup in Field Maps iOS app, I am trying to edit the feature on Survey123 iOS app with the following URL: 

arcgis-survey123://?itemID=myFormId&mode=edit&globalId={globalid}

Am I missing something?

Thanks,

Jonathan1517
Occasional Contributor

Hey Daniel,

Wondering if you've had any luck with this?

Thanks!

0 Kudos
LeahClark
Occasional Contributor

@ShelleySchulte1 Any updates on how you got this to work? Struggling with this myself.

0 Kudos