Overview
Terminates are easy to create in IntelliSurvey's SPL. Terminate tags can be added directly to survey questions or tables, and the set term
widget can be used as a standalone trigger. This tutorial covers various ways to implement and work with terminates.
When terminate tags are added to the survey source code, disp
and disp_first
variables are created in the dataset for tracking termination reasons. Plus, the Terminations tile is added to the Survey Dashboard, providing a quick view of the survey's current termination counts broken out by termination reason. This tile is handy for quickly understanding why respondents are terminating in your project.
Related reading and resources
The following articles can be used for reference with this training module:
- termif and termtext
- term and qualify decorators
- set term
- disp and disp_first
- Termination in tables
- Understanding respondent statuses
Adding termination points
Implement termination tags to control screening criteria.
Open the 'Tutorial - term logic.docx' document (linked below) and review the updated term-related questionnaire instructions highlighted in yellow. We will modify your "FLast_r8_intro" survey with the term-related content that is covered below.
Before you begin adding a few term points in your code, review disp and disp_first.
The disp
variable is generated as soon as you add term tags to your code. It's used for tracking and reporting the termination reason. You can define the text used on disp
in your survey source code with the termtext
tag.
Questionnaire Content | Discussion Details | Coded SPL |
[Terminate if two or more: A1A is not 4 (orange) / A1B is not 8 (yellow) / A1C is not 6 (red)]
|
In the first terminate, the Keeping with the concepts covered in the Create logic tutorial in mind, the condition evaluates each By adding the true and false values together for each question, we can terminate if less than two of the questions had the correct color selected, and allow respondents to continue if they get at least two out of three correct. |
Place this code after A1C:set term: A1ABC |
[Terminate if option 3 (green) or 6 (red) are not selected at A2B] [Terminate if option 99 (none) is selected at A2C] |
For the second and third terminates, for A2B and A2C, the The second example uses the In the third example, A2C uses the |
Place this code on A2B: termif: noneChecked($QA2B,3,6) {text: A2B | Grape Colors} Place this code on A2C: termif: anyChecked($QA2C,99) {text: A2C | Rainbow Colors} |
[Terminate if 'green' entered at A3] |
A3 is an open-ended question, and the logic for the terminate is using standard open-ended conventions. A3 is using 'eq', a text comparison operator for "equal," to check if the text typed into the question is 'green'. If it is, the termination will trigger, and the survey will end for the respondent with a final status of T, for Terminate. |
Place this code on A3:
termif: $QA3 eq 'green' {text: A3 | Green Hair} |
[Terminate if selected option 10 (rare) for each shape at table B1A] |
B1A is a table with data locations for each row. The List functions will help you simplify table logic. These functions were designed specifically so we can reference one or more lists (like in tables). In this case, we'll use the The terminate logic is triggered when it returns 'True'. |
Place this code on B1A:
termif: listCount(SHAPES; anyChecked($QB1AR[id],10)) == 5 {text: B1A | Rare Shapes}
|
Practice what you've learned
Continue to work in your FLast_r8_intro survey (visit Training tutorials for set up steps) by integrating the new content from above.
Once you finish reviewing each survey question, add the new content to your survey area via the Survey Editor. When the survey compiles successfully, launch Testmode by clicking the Test 2 button from this screen. Review your survey and test your new questions. After testing your survey, be sure to make any necessary corrections.
After successfully adding the termination logic to your survey, run dummy data to generate approximately 20 new respondent records. Finally, review the data output by viewing a Response report or creating a new export in Deliverables. You can also explore a Frequency report to see how respondent data is aggregated for the disp
and disp_first
variables.
Reminder, once you integrate all the new content from this tutorial and test it, publish your survey before moving on to the next tutorial.
Comments
0 comments
Please sign in to leave a comment.