Select to view content in your preferred language

Lookup/Select_one for surveys on existing feature services

2140
3
Jump to solution
07-13-2023 08:47 PM
DonaldSchlack
New Contributor

Simple question which i can’t seem to find the answer for.  I want to build a survey on top of an existing feature service and want to use S123 to create sequential sub records for the existing records.  I created a survey using Connect.  How do you set up a “Select_one” field in the XLSForm to look up values in a field in the existing record set of the feature service?  Just the lookup part, I think I can take it from there with the repeat.

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

It sounds like your existing fields accepts 'open text' entry.

select_one questions in Survey123 leverage:

  • Choice Lists (also known as domain values/descriptions); or
  • An external csv file

When publishing a new survey, Survey123 will create an attribute list in your Hosted Feature Layer for each select_one list.

When targeting an existing survey, Survey123 will identify if the field is open or if it has a list.

Survey123 does NOT create a selection from existing values. Only if there's a list.

So you will need to:

  • Manually create a list of values for the field; or
  • Create an external csv of choice lists to constrain the input values at a Survey. The Hosted Feature Layer will accept any response (e.g. if populated through Field Maps).

https://doc.arcgis.com/en/arcgis-online/manage-data/define-attribute-lists-and-ranges.htm

However, I'm a bit skeptical that this is what you need. Creating sequential sub records for existing records? Looking them up with a select_one question? It sounds like you're relatively new to Survey123 and looking to undertake a relatively advanced workflow. You may need to create a related table (the repeat) in your feature service. You'll also want to explore the globalid/parentglobalid relationship between features. If you post more about what you're trying to achieve and the existing data model, we may be able to provide some good resources to help. 

View solution in original post

3 Replies
ChristopherCounsell
MVP Regular Contributor

It sounds like your existing fields accepts 'open text' entry.

select_one questions in Survey123 leverage:

  • Choice Lists (also known as domain values/descriptions); or
  • An external csv file

When publishing a new survey, Survey123 will create an attribute list in your Hosted Feature Layer for each select_one list.

When targeting an existing survey, Survey123 will identify if the field is open or if it has a list.

Survey123 does NOT create a selection from existing values. Only if there's a list.

So you will need to:

  • Manually create a list of values for the field; or
  • Create an external csv of choice lists to constrain the input values at a Survey. The Hosted Feature Layer will accept any response (e.g. if populated through Field Maps).

https://doc.arcgis.com/en/arcgis-online/manage-data/define-attribute-lists-and-ranges.htm

However, I'm a bit skeptical that this is what you need. Creating sequential sub records for existing records? Looking them up with a select_one question? It sounds like you're relatively new to Survey123 and looking to undertake a relatively advanced workflow. You may need to create a related table (the repeat) in your feature service. You'll also want to explore the globalid/parentglobalid relationship between features. If you post more about what you're trying to achieve and the existing data model, we may be able to provide some good resources to help. 

jcarlson
MVP Esteemed Contributor

Actually, you can have a select_one question that looks up all values in a field using the appearance setting search, and you can find the information about it here:

https://community.esri.com/t5/arcgis-survey123-blog/dynamic-choice-lists-using-search-appearance/ba-...

At the most basic level, you can have a field in your form present you with choices based on the existing values in the service.

But I would agree with @ChristopherCounsell  on the point of a relationship class. If you really want your records linked, using a globalid / guid link is the best way to do it.

- Josh Carlson
Kendall County GIS
ChristopherCounsell
MVP Regular Contributor
Oh sorry - that's new to me! Will check it out
0 Kudos