Question filters
Not every question makes sense for every respondent. If someone doesn’t have kids, you don’t need to ask them about parenting. If they’ve never used your product, skip the satisfaction questions. That’s where filters come in—they let you show questions or answers only to the people they actually apply to.
Add filter
Section titled “Add filter”You can filter at two levels: the entire question, or just specific answers within a question. Let’s walk through both.
Question filter
Section titled “Question filter”To filter a whole question:
- Click the question in the flowchart and enter your filter criteria into the Define Filter field in the Properties Pane; or
- Double-click the question in the flowchart, enter your filter criteria in the Define Filter field in the Quick Update Box, and click OK
You can type the filter directly (remember to preface all question references with @), or use the filter builder if you prefer a visual approach:
- Survey Editor (Legacy): click the ellipsis icon next to Define Filter to open the Filter Builder
- Survey Editor (Beta): click Open rule builder under Define Filter, or select Define Filter (or Edit Filter) from the question’s menu, to open the rule builder
Once you’ve added a filter, you’ll see it displayed in the flowchart: to the right of the question in Survey Editor (Legacy), or as “If …” on the question’s card in Survey Editor (Beta).
Answer filter
Section titled “Answer filter”To filter individual answers within a question:
- Click the question in the flowchart
- In the Properties Pane, click the Answers tab (Columns for a grid). To filter a grid row, click the Rows tab.
- Click the answer you want to filter
- Enter your filter criteria in the Code Filter field. To use the filter builder, click the ellipsis icon (Survey Editor (Legacy)) or Open rule builder (Survey Editor (Beta)).
- Repeat for each answer you want to filter
Using the filter builder
Section titled “Using the filter builder”If you’d rather point and click than type filter syntax, use the filter builder. It helps you build filter criteria without memorizing syntax rules.
To open the Filter Builder, click the ellipsis icon next to the Define Filter property.
Once you’re in the Filter Builder dialogue:
- Select your filter driver question (the one with the answers you’re filtering on)
- Drag and drop it into the Defined Filters workspace on the right
- Want to filter on specific answer codes? Click the filter driver question to expand it, then drag just the answer codes you need
To refine your filter, click any line in the Defined Filters workspace. This opens a series of dropdowns that let you fine-tune the logic—the options you see will vary based on the question type you’re working with.
To delete a filter line, click the trash can icon next to it. (If you don’t see the icon, try clicking on the “drop codes here” section first—it’s a bit shy.)
Prefer typing to dragging? Click the Manually Edit Filter button to type your filter syntax directly. You can always click Back to Drop to return to the visual builder.
When you’re done, click OK to save your filter or Cancel to discard your changes.
Click Open rule builder under Define Filter (or Code Filter for an answer or row). The Question qualification rule dialog opens (Answer qualification rule or Row qualification rule for answers and rows).
Each line in the builder is one condition:
- Click Add condition
- In Question, choose the question the filter is based on. Only earlier questions are listed. After the questions, the list also has these global variables: Survey Start Time, User IP Address, User Browser, Device Type and Current Date.
- Set the condition. The fields depend on the type of question you chose:
- Single response question: choose an Operator (such as = or <>) and an Answer code
- Checkbox Multi question: choose an Answer code, then Is Selected or Is Unselected in Selection
- Single response grid: choose a Row code, an Operator and an Answer code
- Checkbox grid: choose a Row code and an Answer code, then Is Selected or Is Unselected in Selection
- Multiple Response - Numerical, Multiple Response - Verbatim or Ranking question: choose an Answer code and an Operator, and type a Value
- Verbatim, numerical or date picker question, or a global variable: choose an Operator and type a Value. Use LIKE to match text patterns. For Device Type, choose Desktop, Mobile, Tablet or Flat in Value.
- To add another condition, set Connector to And or Or, then click Add condition again
- For complex filters, type brackets into Open brackets and Close brackets to control the order the conditions are checked in
- Check the Preview line under the conditions, then click Save
To remove a condition, click Remove on its line.
To type the filter yourself, click Edit as raw text. Click Use rule builder to go back. Some filters can only be edited as raw text, and open that way: for example, filters that use IS NULL, or that refer to an answer code the question doesn’t have.
Clicking Save updates the survey in the editor. Remember to save the survey as well.
Test filter
Section titled “Test filter”Always test your filters before going live. Preview the survey to run through it yourself—make sure you answer the filter driver question so you can see whether your filtered question appears or disappears as expected.
Skip vs filter
Section titled “Skip vs filter”Here’s a performance tip: if you’ve got a whole block of questions that need the same filter criteria, consider using a skip object instead of filtering each question individually. Too many filters can slow down your survey, and nobody likes a laggy experience.