Cascading selects are used to restrict a list of available answers based on the answer to a previous question. This will make your surveys easier to use, keeping choice lists small by only presenting relevant options to users.
Follow these steps to use cascading selects in your survey:
- Enter the values for the choice lists on the choices tab.
- Add one or more column or columns for the cascading select criteria (for example, country, state, city, suburb).
- Enter the relevant value for each choice in the extra columns.
- Repeat for each choice list in the hierarchy.
Once the choice lists have been completed, you'll need to create a choice_filter column on the survey tab. This column will hold the expression used to restrict your choice lists.
To see cascading selects in action, download this sample.
Be aware that at this time, cascading selects can only be used with select_one questions. Choice filters cannot be applied to select_multiple questions. In addition, the values used in the name field of the choices sheet must be text, not numeric.
When reviewing the results of a survey with a question that uses a cascading select, only the name of the choice that is submitted will be displayed. This is different from the behavior of select_one questions without a choice filter, where the label of the choice is displayed instead.
The choice lists associated with cascading selects can get very large and impact the performance of your forms. Survey123 has an option to save these lists in an external file and load them into the survey on demand.
To implement this option, longer choice lists are entered into an additional tab on the spreadsheet for your survey, named external_choices (you will need to create this tab manually). This new tab should contain the same column headings as the choices tab. When the survey is published, values from the external_choices tab will be saved in a file called itemsets.csv in the media folder of your survey project, rather than as part of the form item itself. To reference the choice lists on the external_choices tab, use select_one_external to prefix the list name.
External selects are only designed to work with choice lists associated with a cascading select. Only choices with a choice filter applied will be added to the itemsets.csv file.