Select to view content in your preferred language

URL Schemes

3400
9
Jump to solution
05-07-2021 07:48 AM
EmilySpeck
Occasional Contributor

How do you connect existing feature layer from the web map to survey123 as prepopulated answers to questions?

 

1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Correct! Target being the survey field name, source being the field name from the clicked feature.

- Josh Carlson
Kendall County GIS

View solution in original post

9 Replies
jcarlson
MVP Esteemed Contributor

Check out this blog post, which walks through the process in detail.

- Josh Carlson
Kendall County GIS
EmilySpeck
Occasional Contributor

I do not have a globalid for my feature layer. I have an Objectid

0 Kudos
jcarlson
MVP Esteemed Contributor

With the recent updates to Survey123, you need a globalID. In your layer's settings, turn on "Enable Sync" to easily add the field. You can turn the setting back off after, if that's a particular concern.

jcarlson_0-1620401029000.png

 

 

- Josh Carlson
Kendall County GIS
EmilySpeck
Occasional Contributor

I have the globalid on, but it still was not able to work.

This is a brand new survey with no data yet, on arcgis online I have a hosted feature layer that has points that I want to use to prepopulate questions in the survey when my field workers use it. 

I am unsure how connect this layer to the survey using url

jcarlson
MVP Esteemed Contributor

What does your generated URL look like? It's case-sensitive, so "globalid", "globalID", and "globalId" are not the same. Make sure you're using globalId={globalid}

- Josh Carlson
Kendall County GIS
EmilySpeck
Occasional Contributor

<a href="arcgis-survey123://?itemID=f8bce2f086864f25b685c0eab03e2652&amp;field:globalId={globalid}rel=" nofollow="" target="_blank" ugc"=""><br />Add New Point!</a>

This is the URL that I am using

jcarlson
MVP Esteemed Contributor

Ah. For successive URL params, you need to separate them with & characters.

https://some-url?firstParam=something&secondParam=somethingelse&thirdParam=andSoOn

Using that format, make sure each field gets its own &field:fieldname={field} parameter.

And my mistake, I re-read your earlier post. As you are using the features to create new entries in the survey dataset, you don't need to reference the feature's globalID. That's for editing existing features via survey.

To essentially "copy" values from one layer into a totally separate survey, it's a bit simpler.

arcgis-survey123://?itemID=f8bce2f086864f25b685c0eab03e2652&field:target1={sourcel}&field:target2={source2}
- Josh Carlson
Kendall County GIS
EmilySpeck
Occasional Contributor

target1={source1} do you add your own fields instead? 

jcarlson
MVP Esteemed Contributor

Correct! Target being the survey field name, source being the field name from the clicked feature.

- Josh Carlson
Kendall County GIS