Place a term
decorator on an inline list option or setlist (standalone list) option to terminate any respondent who selects the option. Survey Programmers (SPs) can do this in one of two ways:
- Use
term: y
to terminate the respondent. Thedisp
variable will use the question text as the termination reason/option text and the question ID as the option ID. - Use
term: other text here
to add a custom termination description. Thedisp
variable will use the custom termination text as the termination reason/option text and the question ID as the option ID.
Syntax
The term
decorator can either accept the input of 'y' or a text description that can be used in reporting. Similarly, the qualify
decorator (new in r8.0) will accept the same inputs and works as the opposite of term
.
Both term
and qualify
have tag versions as well -- termif
and qualifyif
. See termif and termtext for more information.
'term: y' and 'qualify: y'
X. This is a question where selecting '2' with terminate you.
type: radio
1. Option 1
2. Option 2 {term: y}
Y. This is a question where selecting '1' will allow you to qualify/continue.
type: radio, checkbox, etc.
1. Option 1 {qualify: y}
2. Option 2
Using 'term' and 'qualify' with alternate text
X. This is a question where selecting '2' with terminate you.
type: radio
1. Option 1
2. Option 2 {term: Term Text}
Y. This is a question where selecting '1' will allow you to qualify/continue.
type: radio, checkbox, etc.
1. Option 1 {qualify: Qualify Text}
2. Option 2
Note: The qualify: y
and term: y
tags are opposing functions and should not be applied to the same question/variable.
Caution! Simple term: y
decorators can be placed on the same question, but you should not utilize multiple term
decorators with custom text in a single question. If any of the term
decorators require custom text, use the more powerful tag termif
to ensure correct reporting behavior. For more on termif
, see termif and termtext.
Examples
Simple 'term' decorators
In the example below, a term instruction has been added to '1. Male' at Q1. The disp
system flag variable will add a 'Q1. Gender | Male' option. A term instruction has also been added to '2. No' at Q2. Since it used the {term: y}
, the disp
variable will add a 'Q2. Are you registered to vote?' option.
1. What is your gender? type: radio 1. Male {term: Gender | Male} 2. Female 2. Are you registered to vote? type: radio 1. Yes 2. No {term: y}
Simple 'qualify' decorators
In r8.0+, SPs may instead use the qualify: y
decorator to indicate which options allow the respondent to "qualify" to continue with the survey. Like term: y
, a single survey element can include multiple options with qualify
decorators, and it will also accept qualification text. Using the previous examples, Q1 and Q2 could instead be coded as follows using qualify: y
.
1. What is your gender? type: radio 1. Male 2. Female {qualify: Gender | Male} 2. Are you registered to vote? type: radio 1. Yes {qualify: y} 2. No
Tip! When qualify: y
or term: y
tags are applied to list options, whether in a setlist or derived list (e.g., optsfrom: Q1.options
), the qualify definition or termination definition will persist past the initial usage. If this behavior is not desired, consider instead including the qualify if
tag or termif
tag, respectively, on the question instead.
Replacing 'termif' and 'termtext'
In the following example, a respondent may be "termed" (terminated) for providing a ZIP code in a previous question that is outside of the United States. The first version of this example uses both the termif
and termtext
tags to establish the term condition and term reason displayed in the survey's results. In the second version, an inline term
decorator is used with the option '99. State not found', consolidating the functions of these two tags into one inline statement.
STATE. Zip to State ap: n type: radio derivefrom: Q1 StateCode {default: 99} optsfrom: system.states -[52] 99. State not found termif: anyChecked($QSTATE,99) termtext: Q1 - Non-US Zip #Replacing 'termif' and 'termtext' STATE. Zip to State ap: n type: radio derivefrom: Q1 StateCode {default: 99} optsfrom: system.states -[52] 99. State not found {term: Q1 - Non-US Zip}
Using 'deferterm'
In the following example, the deferterm
tag is set up under the app config
widget, establishing a later (deferred) page for the respondent to terminate at instead of terminating immediately at the point of the term logic (Q1A). The respondent will be allowed to answer additional questions until they reach the labeled deferred termination page (TERM_OUT). Since the second termination is after the TERM_OUT page, it will cause the respondent to term immediately if they select '3. Currently unemployed'.
appconfig deferterm: TERM_OUT 1A. Are you over 18? type: radio 1. Yes 2. No {term: Q1A - Under 18} 2A. What state do you live in? type: pulldown optsfrom: system.states 3A. How long have you lived there? type: radio 1. < 6mos. 2. 6 mos. - 1 year 3. 1 - 2 years 4. 2 - 4 years 5. More than 4 years newpage: TERM_OUT 4A. What is your current job status? type: radio 1. Work full time (32+ hrs./week) 2. Work part time 3. Currently unemployed {term: Q4A - Unemployed}
Comments
0 comments
Please sign in to leave a comment.