The qualify if
tag defines conditional logic for qualifying respondents based on their answers.
1. Which age range do you fall into?
type: radio
1. Younger than 18 years old
2. 18 - 24 years old
3. 25 - 44 years old
4. 45 - 64 years old
5. 65 years old or older
qualify if: anyChecked($Q1,4,5) {text: < 45 yo}
Tip! The term if
tag is the opposite of qualify if
and may be preferable to match logic specified in a client-copy of a survey. Note, qualify if
and term if
are opposing functions and should not be applied to the same question/variable.
Details
- To set up qualification logic, add the
qualify if
tag to a question or non-quota variable and define a logical condition (e.g.,anyChecked($Q1,4,5)
) as its value. - Just like
term if
, theterm text
tag ortext
decorator customizes the termination text to display in reports. - To streamline code, the
qualify if
tag andtext
decorator are used in a single line of code as shown above. Alternatively, use a multi-line approach by placing thequalify if
andterm text
tags on separate lines. - The logical condition can reference content on the same page or elsewhere within the survey.
- Once a
qualify if
tag is added to the survey source code, the tracking variablesdisp
anddisp first
are added to the survey's data. - You can include multiple
qualify if
tags on a single question, provided each has a unique ID and text decorator. - When a single
qualify if
tag is used, theterm text
tag ortext
decorator is optional. However, it is recommended for better clarity and brevity in reports and exports.
Tip! The decorator version of qualify if
, qualify: y
, can be applied directly to an answer option for simple qualification instructions.
Additional examples
Using the multi-line approach
Let's reuse the example above but apply the multi-line approach using the term text
tag. This achieves the same results in reports and exports.
1. Which age range do you fall into?
type: radio
1. Younger than 18 years old
2. 18 - 24 years old
3. 25 - 44 years old
4. 45 - 64 years old
5. 65 years old or older
qualify if: anyChecked($Q1,4,5)
term text: < 45 yo
Applying multiple 'qualify if' tags
A question or variable can include multiple qualify if
tags, each with unique IDs and text
decorators. This ensures individual qualification points have distinct labels and descriptive texts in reports and exports.
11. Which isn't a fruit?
type: checkbox
1. Banana
2. Apple
3. Broccoli
4. Tomato
qualify if: noneChecked($Q11,1,2) {text: Not paying attn} {id: Q11A}
qualify if: noneChecked($Q11,4) {text: Selected Tomato} {id: Q11B}
Comments
0 comments
Please sign in to leave a comment.