The <term> element is used to terminate respondents. Use the
cond attribute to create condition logic that will terminate respondents if evaluated to True.
<term cond="Q1.r6">Q1: Selected "None of the above" at Q1</term>
Use human-readable, descriptive text within the body of the <term> element that will show up in the Terminates tab of the field report. This will better help you understand why a respondent was terminated.
The <term> element has access to the following attributes:
|cond||string||Python expression that must be True in order to execute|
|dupeCheck||string||Checks for duplicate data and terminates if found (cannot be used with
|incidence||bool||Include in incidence count? (default is 1)|
|markers||slist||Comma-separated list of markers to set before terminating|
|label||string||Unique symbolic identifier (only required if using
cond - Set the Terminate Condition
cond attribute controls whether or not the respondent should terminate. If the condition evaluates to True, the <term> element will execute and the respondent will be terminated.
For example, in a survey that is fielded for females only, you may see something like:
<radio label="Q1" optional="0"> <title>Are you...</title> <row label="r1">Male</row> <row label="r2">Female</row> </radio> <suspend/> <term cond="Q1.r1">Q1: Male respondent</term>
dupeCheck - Terminate Based on Duplicate Values
dupeCheck attribute will terminate if the value provided already exists within the dataset. This includes qualified, terminated and partial respondents.
For example, to terminate someone who has entered a duplicate email address:
<text label="Q1" optional="0"> <title>Please enter your email address below:</title> </text> <suspend/> <term label="Email_Check" dupeCheck="Q1.val">Q1: Duplicate Email Address</term>
In the example above, if anyone enters an email address that has already been provided at Q1 (even if terminated or partial) then they will be terminated.
You can also use this to terminate anyone who enters the survey with an
extraVariable that has already been seen:
<term label="Duplicate_ID" dupeCheck="ID" incidence="0">ID Check: Duplicate ID</term>
The <term> tag's label attribute can only be used when working in the XML editor as it is incompatible with the user interface.
incidence - Control Incidence Counts Based on Termination
incidence attribute controls whether or not to record the terminated respondent in the incidence count.
incidence="0" is specified, the respondent will not appear in the incidence calculation.
Incidence calculation is:
(qualified + overquote) / (click-through - partial - excluded)
<term cond="QDisclaimer.r2" incidence="0">Disclaimer: Disagreed to disclaimer</term>
markers - Set a Marker When Terminated
makers attribute enables you to set additional markers when terminating the respondent.
<term cond="Q1.c1.all" markers="straightliner,Q1_SL">Q1: Straightlined at Q1</term> <term cond="(timeSpent() < 300) and not gv.isSST()" markers="speeder,lt_5minutes">Speeder: Less than 5 minutes</term>
label - Set the Terminate Name
label attribute is only required if using the
dupeCheck attribute. This is the unique identifier for the <term> element.
<term dupeCheck="Email.val" label="Email_Checker">Email: Duplicate Email Entered</term>
3: What's Next?
Learn more: Adding Condition/Skip Logic.