Struggling with mode=edit in URL parameters for portal Survey123

380
6
Jump to solution
04-15-2021 08:10 AM
ShelleySchulte1
New Contributor III

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 Regular 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

6 Replies
jcarlson
MVP Regular 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
New Contributor III

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

0 Kudos
jcarlson
MVP Regular 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

ShelleySchulte1
New Contributor III

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
New Contributor III
0 Kudos
ShelleySchulte1
New Contributor III

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