A powerful functionality of the Template Creation Tool is the Insert text if not-checked option. This enables the creation of ‘if-else’ mechanisms for choice questions: if option A is not selected, then option B automatically applies. It can be used to greatly streamline a questionnaire and prevent user errors, particularly in scenarios where multiple options can be selected.
A. BASIC USE
The most basic use case for this functionality is having one choice option to insert one of two different pieces of text. Depending on whether or not that option is selected, either the one or the other is inserted. This distinguishes it from the clause inclusion or other simple questions that only have a single answer (typically ‘Yes’), because they only govern the inclusion or exclusion of a single piece of text.
The same effect can be achieved with two choice options (e.g. Yes and No) of course, but you may want to cut down on essentially redundant options – especially if the questionnaire is fairly lengthy already. Another consideration might be that while No should be the default answer, having that option preselected in a questionnaire might make users somewhat complacent. An empty checkbox labelled Yes could prompt them to more carefully consider the answer.
Creating such an if-else mechanism is easy:
1. Switch the Show advanced vs. all basic functionalities button to the ON position.
2. If you haven’t done so already, create a choice question (for instructions on how, see this page and the subsequent tutorials).
3. When adding or editing the single choice option required, select Insert text if not-checked.
4. Click Insert (or Save, if you created the choice option previously).
5. Click If selected and enter the text that should be inserted if the single choice option is selected (remember to click Save the changes made).
6. Click If not-checked and enter the text that should be inserted if the single choice option is not selected (again, click Save the changes made).
Note: instead of just a text fragment, you can naturally use this method to insert different clauses as well.
B. ADVANCED USE
While using a simple if-else mechanism as described above may be considered purely optional, sometimes this functionality provides the only sensible and practical solution. This is the case if a choice question allows for multiple options to be selected, while certain combinations should have different outcomes.
With Insert text if not-checked, it is possible to in effect create automated flowcharts that always produce the correct result. Multiple such if-else choice trees can be strung together using the same global question (see also this tutorial).
Otherwise, you would either have to explicitly ask users what combination they previously selected (which would feel redundant and creates room for error), or change the question to allow only one option to be selected. In the latter case, that would mean creating options for all possible combinations. That would be inelegant at best and likely to become unwieldy quite quickly for the end user.
For example, suppose there is a question with options A through D. Each option individually must insert some text (A, B, C, D) . If options A and B are both selected, but none of the others are, then the output should not be “A and B”, but rather “E”. If options B and D are both selected, but none of the others are, the output should be “F”. If any three options are selected, the output should be “G” and if all are selected it should be “H”.
The least cumbersome way to achieve that result would be to have a single question, where the user can only pick one answer and every (permissible) combination is represented. The available choices would look something like this:
- A
- B
- C
- D
- A and B
- B and D
- Three of the above
- All of the above
This feels a bit clumsy, however. It is also a little confusing: which options exactly do “Three of the above” and “All of the above” refer to? It could be clarified by making the options more descriptive, but it’s generally preferable to keep answers as short and straightforward as possible.
With the use of the if-else mechanism, only the initial four options A through D would be needed. As mentioned, this can be done by stringing choice trees together. Doing so will let the Weagree Wizard automatically eliminate whichever combination of answers does not apply.
So, to establish whether only A and B are selected, you would start with an if-else choice tree for that answer. Then, for If selected, you would insert another if-else choice tree where If selected is linked to B, and another linked to C and D. This would end with an If not-checked for C and D, which would then insert “A and B”. This is how it would look in the Template Creation Tool and how the three required choice trees would be configured:
Visualised as a flow chart:
Incorporating all the combinations described above will of course take some work. Separate checks will have to be performed for the selection of C or D (to determine whether three or four options have been selected) and separate chains of choice trees, each having two possible outcomes, will have to be created for the event that A was not selected. This requires some practice and patience, but can be highly effective and produce very user-friendly and secure questionnaires.