QS:Array filter
From LimeSurvey Manual
Array filter (array_filter)
Description
The Array filter setting allows you to use any multiple choice question to select or set which responses display in a subsequent list, array or multiple choice question.
- Multiple choice
- Multiple choice with comments
- Multiple short text
- Multiple numeric
- Array (5 point, 10 point, Yes/No/Unknown, Increase/Same/Decrease, Column)
- Array (Dual Scale, Text, Numbers)
- Ranking
Furthermore, each of these types of questions can be filtered.
The only exception is Array (Column), which can filter other questions, but can not itself be filtered.How to set a filter
To set a filter, enter the question code of a multiple options question in the array filter box. This will be used as the source of information for our current question which retrieves the selected answers from the previous questions and use them as answer options. For example, if your source multiple option question code is "Q1", enter "Q1" into the 'Array Filter' box to start the filtering process of the answers. Only the answer options that are selected in question Q1 will be visible in the array_filter-ed question.
Cascading
The selected options can be displayed in cascade. This means that you can select a question which filters another question, which filters another question, and so on.
Array filter example
Let's take at the following example to better understand the power of this setting.
In the first image, we have the following question and answers:
[[File:]]
Array filter example 2 - Using Multiple Short Text
Here is the Limesurvey Group file for the above demo
Array filter example 3 - Cascading Array Filters
This sample survey shows use of array_filter, array_filter_exclude, and exclude_all_others, plus cascading array filters.