Cascading Selects and External Selects

20059
21
10-21-2015 11:27 PM
HannahFerrier
Occasional Contributor III
8 21 20.1K

One of the coolest new features in Survey123 is the addition of cascading selects and external selects. What are cascading selects? Imagine you are collecting information about different plant species. You will have a list of plant genus and a list of species. Each single species belongs to a single genus. In Survey123, you can restrict the list of species using the genus name. The first step is to add an extra column to the choices tab in your spreadsheet to hold the values that correspond to each choice.

treespecies.PNG

This example is only using 2 lists, but you can use as many as you need (e.g., country, state, city, suburb)

Now to get the cascading select working, we need to set the choice_filter on the survey tab in your spreadsheet. We use this field to hold the expression to match the additional columns on the choices tab (e.g., attribute=${value}). In this example, we will use the expression genus=${genus_name}

choicefilter.PNG

Now we can see how the species list is restricted using the selected genus in the form:

cassel.PNG

As you can imagine, the lists associated with cascading selects can get quite large and impact on the performance of your forms - which is where we can use external selects. External selects are only designed to work with choice lists associated with a cascading select. You can add an extra tab to your spreadsheet called external_choices. It should contain the same column headings as your choices tab. The values from the external_choices tab will be saved in a separate file and the loaded from this external file into your form as the values are needed. To reference the choice lists on the external_choices tab, use select_one_external to prefix the list name.

externalll.PNG

For more information, see: Survey123 for ArcGIS support for XLSForm and feel free to post any questions below.

The Survey123 Team.

21 Comments
DougBrowning
MVP Esteemed Contributor

Can multiple forms use the same external choices sheet?  If so can I then update itemsets.csv in AGO and the new choices are available to all the forms?

thanks

DougBrowning
MVP Esteemed Contributor

When I try to add a external list it just keeps saying it can not find the list in the choices sheet.  Not sure what else to try.  I have 1.1.19.

Anything else I can try?

thanks

DougBrowning
MVP Esteemed Contributor

I got it to work.  The external MUST be linked to a cascading select (above it just says designed). 

But I am not seeing a seperate csv sheet uploaded.  I was hoping to link to one central pick list for multiple forms.  It seems that if I have a pick list common to all forms and I wanted to add an item I would have to add this item to each form one by one and republish each one.  Then have the users redownload each form one by one.  Please tell me I am wrong because this is extremely clunky.

It may work that I can just copy and paste the itemsets.csv to each form directory but i would then still have to republish each form and have each user redownload.

It would be really nice to have the list link to a URL of a table on AGO.  That way I just update in one place.

StevenMichalek
New Contributor II

Anyone else getting slow response times?

I have a list with roughly 1500 items.. Where items are divided by School / County / School District.

On larger school districts, it can take around 30 seconds to display the associated schools

Will this possibly be handled in the update schedule in February?

JohnPlunkett
Esri Contributor

Hi Steven

I'm an Esri Distributor in NZ,

Slow Survey Load Times · Issue #234 · Esri/Survey123Community · GitHub

They say that in the Feb update, it should be fixed

Cheers

John

by Anonymous User
Not applicable

make

by Anonymous User
Not applicable

I haven't been able to use the external .csv file without using a calculate and note field.  if you are using an external list then you must designate select_one_external or selected_multiple_external.  I also haven't gotten the external to function unless I have a worksheet in the file named external_choices.

German_DarioGalvis
New Contributor

Hello

 Is this function implemented in web version?

JamesTedrick
Esri Esteemed Contributor

Hi German,

Cascading & External selects work in the web form.  You must author them using Survey132 Connect, however.

erica_poisson
Occasional Contributor III

Can cascading selects be used with select_multiple questions? For instance, I have one select multiple question, that I want to influence choices for a second select multiple question.

See attached XLS form screen capture for example.

AnastasiaNaymushina
New Contributor III

How about supporting media in external choices? I didn't manage to get media working.

The case is - a long list of birds and animals (about 60). If I use internal choice list I can add an image and audio to each choice (for each animal). But the survey takes too long to download on device. I've tried to put the list into external choice list, but it shows only the label - no other media files.

by Anonymous User
Not applicable

Hi Anastasia,

Media content, such as image or audio, is not supported for external choice lists.

Phil.

AnastasiaNaymushina
New Contributor III

Are there any plans to support this functionality? And, maybe, any advice to make form with pictures loading faster?

by Anonymous User
Not applicable

Hi Anastasia,

We do not currently have any plans to support this functionality in the near future. I have added your comments to the enhancement we have in our backlog for this issue.

In terms of making the form and pictures load faster, I would suggest ensuring the size of the images is reduced to the smallest possible that the quality is still ok. the size of your media folder (if you check via Connect on a PC) will be the size of the data that needs to be downloaded and opened in the app on a device.

Phil.

Chris_Anderson
Occasional Contributor II

Can you perform a cascade select/external using multiple choice filters? I would like to narrow down a list of facilities based upon county and facility type. The inspector would choose what county they were in, then select what type of facility they were visiting. The hope is that the two choices would help narrow down the known facility names available in a facility name pick list.

Chris_Anderson
Occasional Contributor II

I found a solution.

JasonFrancis
New Contributor

I have the exactly same question and did not see any answer here.

Did anyone made the cascading for select_multiple work?

Ming

JamesTedrick
Esri Esteemed Contributor

Hi Jason,

Cascading selects are currently not supported with select_multiple questions.

----

Update (October 2020): Cascading selects with select_multiple are now supported, refer to the implementation of ENH-000103222 mentioned in https://community.esri.com/groups/survey123/blog/2020/10/19/whats-new-in-survey123-october-2020 

CoryBolen1
New Contributor III

I am having a similar problem that was mentioned at beginning of post but not sure of the remedy.  Trying to set up a vegetation survey and create a select_one_external choice along with cascading select.  My first want to select plant genus and then ultimately select from the cascade select species. Both genus and species are in my external_choices worksheet.  I get an error stating 'row: 40 - List name not in choices sheet: genus'.  Shouldn't this be referencing the external_choices sheet?  What am I missing?  My external_choices list is just a test right now, but ultimately I will have several thousand records to reference.

external_choices

DougBrowning
MVP Esteemed Contributor

is the genus1= part in the choice_filter field?  You cut off the column names but choice_filter is not next to autocomplete.

I did have one case where I had to ref a second field.  That was using a txt lookup though.  So I could not do list="woody" I had to create a note field and give it "woody" as the value the write it as stuff=${notefield} for some reason.

Also make sure no commas at all in your choice lists.

by Anonymous User
Not applicable

Hi Cory,

Just letting you know that in the latest 3.12 beta builds available on the Survey123 Early Adopter Community we have made significant improvements to large choice lists which improve the survey load time in both Connect and the field app and further improvements to stability and speed of select one and select multiple choice lists once the form is open. From our testing this significantly reduces the time it takes to open a survey with very large choice lists.

On top of this there are now some new ways you can manage your choice lists dynamically and update them without having to republish the survey. Please check out the latest announcement on EAC and test out these new beta features with the latest 3.12 beta builds.

Regards,

Phil.