Select to view content in your preferred language

Filtering the options of a question based on the selected options of the previous questions

145
2
08-13-2025 10:06 AM
Labels (1)
FarzanehAhmadikordasiyabi
Emerging Contributor

There is a question in my survey which is select_one studytype or_other and choices are:

midblock_study_volumeonly, midblock_study_speed_volume, turning_movement_study_intersection_volume, crosswalk_study, and pathway_study.

The next question in the survey is select_multiple vehiclemode or_other and choices are:

all_vehicle_classes, pedestrian, bikes_on_roads, and dedicated_bike_lanes.

how can I reach the goal that if clients select midblock_study_volumeonly , the next questions choices should show only all_vehicle_classes, bikes_on_roads, and other. if clients select midblock_study_speed_volume, , for the next question it just shows all_vehicle_classes. For the other selected options of studytype  all the options of the second question should show.

0 Kudos
2 Replies
MattEdrich
Frequent Contributor

I think you will need a cascading select here, which is not hard to setup, but does require some more sophisticated use of the 'survey' and 'choices' sheets in tandem.

To do it, you will have to add a column to your 'choices' sheet (any column will work, I usually start with D) and name it something relevant to your use case - perhaps "midblock". Then, in your vehiclemode choice list, add the specific values from your studytype question that are relevant to each vehicle mode as row values in your "midblock" column. Finally, on your 'survey' sheet, you will need to use selected(${<studytype field name>}, <"midblock">) in the O (choice_filter) column for the vehiclemode question.

Some visuals from doing this in my surveys:

Choice list that filters: 

MattEdrich_0-1755113401159.png

Choices that get filtered:

MattEdrich_1-1755113427920.png

Applied on the `survey` sheet:

MattEdrich_2-1755113490185.png

I'm not sure if this will work with select_multiple questions being the choices that get filtered by a preceding choice, but I suspect it will.

Very helpful post on this: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-choice-filters/ba-...

 

MattEdrich
Frequent Contributor

If the above doesn't work, a good fallback for you could be to simply setup additional choice lists that are relevant to each choice available in your select_one question, and then just use relevant logic to display each subsequent question accordingly. Not quite as clean, definitely a brute force method, but if you aren't rolling a large survey form, this would definitely work.

0 Kudos