I’m often asked about how to best use the Survey tool in HCL Connections to set up questionnaires or polls. Rules often play an important role and often cause questions. So to document how I do this (for myself as well as others who might benefit), I will write down a few tips below.
- Where do you find Rules?
- How do you see which rule applies to which question?
- How do you set up to and show an additional text box when an ‘Other’ option is selected?
- How do you set up a rule to show a text when an answer is right and a different one on when an answer is wrong? (conditional showing)
Where do you find rules?
The rules section in a survey can be opened by using the little rule icon behind any of the questions of your survey. The resulting window shows you both the rules for that question as well as all other rules.
How do you see which rules apply to which question?
This is kind of tricky as all rules simply are numbered. But there is a way to see it. If you want to know which rules apply to a specific question simply go to the question and click the ‘rules icon’ on that specific question’s box. This will show the rules interface and all rules that are affected but the ones releated to the selected question will have a little icon in front of them:
Alternatively, open the ‘Rules’ popup and use the field selector in the left lower bottom to select the question or paragraph you are interested in and the icon will automatically appear before the rules or rules that are affected by it.
How do you set up to and show an additional text box when an ‘Other’ option is selected?
First create the original question and the ‘Other’ box (which is a normal question but one with the text box as answer option). Then open the rules interface and create a single rule that is set to:
IF <question 1> DOES NOT EQUAL <‘other’ option> THEN <question 2> HIDE
Why HIDE you ask? Well if you would formulate this differently like for instance “Show <your ‘other’ option> when <Question 1> is set to ‘Other’ ” then the ‘Other’ option would always be show. As the default is that a question is always shown unless it is explicitly hidden. We don’t want that as we want to show it only when ‘Other’ is selected so we exclude all other options by using the HIDE options.
How do you set up a rule to show a text when an answer is right and a different one on when an answer is wrong? (conditional showing)
Ok, this one is a bit more complex as it’s not as obvious as it might look. First of all, as we have two potential texts to first hide and then show, depending on which answer is given. So we will have at least two rules. But secondly if you have multiple potential answers it gets even more complicated.
The first thing is to think out what you want in your head:
- I want to hide the ‘Good’ paragraph when the selected answer is NOT answer C (so it’s either empty or A, B or D)
- I want to hide the ‘FALSE’ paragraph when the selected answer is C OR if the answer is empty.
Rule one only requires one condition as saying to hide it ‘if not C’ will automatically ensure that the line is hidden also when no answer (empty) is selected. Rule two has two conditions as you need to hide it when C is selected but also when nothing is selected. If you leave that second part away it will not only show when A, B or D are selected but also right away, before any answer was selected. Which is exactly what you don’t want.
- IF <question 1> DOES NOT EQUAL <your correct option> THEN <paragraph to show when correct> HIDE
- IF <question 1> EQUALS <your correct option> OR <question 1> EQUALS <….(empty selection)…>THEN <paragraph to show when false> HIDE
Navigation and interface….
Well if you made it this far you probably already noticed that surveys are a great tool do to surveys and polls but also that certain things could be improved….. Especially around rules. I therefore submitted an idea to do certain improvements on Surveys. Please help support these by voting for the idea on the HCL Connections Idea portal!