Select to view content in your preferred language

Use answer from previous question to limit dropdown choices

3070
4
Jump to solution
11-08-2017 04:14 PM
CharlottePeters2
Occasional Contributor

Hi,

I'm using Survey123 Connect for ArcGIS v. 2.4.60 to create an asset survey form. I have several asset types that will ask "What type of material is asset made of?" Some materials are specific to an asset while other materials can be used to describe several different assets. Instead of creating 20 separate lists for each asset's material dropdown list, I would like to create a single materials list (see graphic) and have the chosen asset type limit the material choices to relevant materials. For example, the user selects the type of asset from a "select_one asset" list (e.g. road) and the corresponding "select_one materials" list will only contain materials used on roads (e.g. asphalt, gravel, dirt, etc.). Select waterline for the asset and the materials list will contain pvc, copper, and steel. If this is possible, how would I get started?

screen clip of materials list for all assets

Thanks, Charlotte

0 Kudos
1 Solution

Accepted Solutions
ClaireProctor
Deactivated User

Hi Charlotte,

This looks like a job for cascading selects, which should do exactly the workflow you're describing.

Cascading and external selects—Survey123 for ArcGIS | ArcGIS 

There's also a sample showing how these work, which should give you a good idea of how they work and if they solve your problem.

View solution in original post

4 Replies
ClaireProctor
Deactivated User

Hi Charlotte,

This looks like a job for cascading selects, which should do exactly the workflow you're describing.

Cascading and external selects—Survey123 for ArcGIS | ArcGIS 

There's also a sample showing how these work, which should give you a good idea of how they work and if they solve your problem.

CharlottePeters2
Occasional Contributor

Hi,

I found out I can use the "choice_filter" column in the XLSForm to restrict my asset materials list based on the selected asset.

Is there a way to limit the materials dropdown list options based on a value from within the materials dropdown list?

For example, I have a materials list for "fence", "fence_post", and "fence_brace".

list of fence materials

If the user selects "fence" for the asset, then the materials list populates with fence materials of "barbed wire", "chainlink", "hogwire", etc. Also because "fence" was selected, 2 new dropdown lists appear for fence brace material and fence post material. For the fence post dropdown list I already know that I only want to pull the "fence_post" materials from the master list. I've tried different syntax in the "choice_filter" column, but cannot get the list to populate on the form.

If the user selects "building" for the asset, then the fence brace and post fields disappear and the roof material field appears.

XLSForm example

What is the syntax for filtering a list based on a known value?

Thanks, Charlotte

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Charlotte, 

The choice filter currently cannot evaluate fixed strings such as infra_filter = "fence_post" .  In this context, it would make sense to create separate lists for each question rather than have one 'materials' list (which, admittedly, you wanted avoid).  Another method would be having additional hidden fields to provide the filtering capability (in your example a question called fence_post with a value of 'fence_post').

0 Kudos
CharlottePeters2
Occasional Contributor

Hi James,

Thanks for the input. I'll create the separate lists for the hidden fields. At least I got to merge the other asset materials into a master list.

0 Kudos