What are Filterable Select Questions?
A Filterable Select Question is a select question with options based on the option selected from another select question.
When would I use a Filterable Selection Question?
Say you have a parts list with 1,000 parts, but only 200 of them are associated with the northeast region. Your team in the northeast region only wants to see those 200 parts when they're filling out their form, not all 1,000. Using a Filterable Selection Question, when your team selects "Northeast" as the answer in the "Region" question, only the 200 corresponding parts are shown to them when they open the "Parts" question.
How do Filterable Selection Questions work?
In this article we will walk you though a basic example of a Filterable Select Question.
Filterable Select Questions are based on the data you upload as a Resource. Let's say you have a spreadsheet that contains data for all the cities and states in the USA, broken out over 2 sheets:
You want users to select the state, which should filter only the cities associated with that state, and automatically populate the population for that state. Before you proceed, please note that all select options will need to have unique identifiers regardless of the filter you've created. See the "City ID" column in the above screenshot which will be used as the identifier column for our filtered select question in our form.
How do I build a Filterable Select Question?
First you need to create a new form so that you can enter build mode. From your dashboard, click the "Forms" icon on the blue bar in the left-side menu, then click "New Form".
Now you should see the form builder screen in front of you.
Now you will add your first select question for state and follow the next steps (screenshots) of how to apply your resource file and populate your first select question.
Now that your resource is attached, select the "Options Table" value that you want the question to reference. In this example, that value is "US Geography.States".
Set the "Text Column" (The column of the data that needs to be displayed).
Now set the "Identifier Column" to "Abbreviation", as this is the text that will be displayed when the data is submitted by the user, instead of the state's full name. Please note, a separate identifier column isn't required when all select options are unique.
Now you are going to move on to the select question for cities. This select question needs to be filtered, depending on which state was selected in the previous select question.
Because you have already attached your resource file, you can click on the "File List" tab and attach the corresponding resource file to your select question.
You are working with the "State Cities" select question, therefore you will use the other sheet called "US Geography.Cities".
You will set the "Text Column" to "City".
Because there are cities with the same names, a column has been created for "City ID". This column contains the state abbreviation as a prefix to make it easier to identify the state of the city while also making your select options unique. You will use this for the "Identifier Column".
Select the option to filter by clicking on "Set Filter".
You will be prompted with a screen to set the conditions to determine the outcome of your filtered list.
You want a list of cities to be displayed, so in order for you to achieve this you will need to set your condition as follows and click "Save".
Set Filter translation: The "State" column text value for each row must equal the answer to the "USA States" question or else the "City" value in the same row will not be a visible option in "State Cities".
Save the form and sync your forms list. On your device you should now see the form. On open, you will be able to see the questions you have created.
When choosing a state, you can start typing and it will filter down your options.
In this example, you have selected Rhode Island as the state. Now, when you open the "State Cities" question, you will only see the cities for Rhode Island.
Select your city and submit your form.
Check our our blog post series with more examples of Filterable Select Lists;
Other Useful Articles:
- Resources Overview
- Updating a Resource
- Advanced Filtered Select Questions
- Select Options from a Resource
If you have any questions or comments feel free to send us a message at firstname.lastname@example.org.