What do you need help with?

Display an item according to the number of answers previously selected

1 min read

AI Doc Summarizer AI Summary

Sometimes it might be necessary to display an item according to the number of answers previously selected in a multiple choice question.

Instructions with Filter Editor #

Click on the “Logic Conditions” button (theicon) of the item you want to filter.

In the editor, you can either use the graphical interface or write the filter in the code editor.

If you use the graphical interface, simply enter the code for the question to be checked, select the “Count Responses” function as the comparison parameter, and specify the number of responses.

Alternatively, you can click on “Code Editor” and enter the following syntax:

if(CountCode (Question Code) == Number of selected options)

Instructions with IdCode #

If you wish to set the filter directly from IdCode, you can do so by entering the following syntax next to the item you wish to filter:

/F “if(CountCode(Question Code) == Number of selected options)

You can set the number of options to be checked in this case as well.

Example #

In question “Q1”, I ask which product(s) from a specific brand the respondent would purchase. I want page “P2” to be displayed only if I select a single option in question “Q1”.

In the filter button on page “P2”, I will need to set the following filter:

if(CountCode(Q1) == 1)

Here’s the complete IdCode:

IdCode
/page P1
Q1 ->M
 Which product(s) from Brand X would you like to buy first?
1 Item 1
2 Item 2
3 Item 3
4 Item 4
5 Item 5
6 Item 6
/page P2 /F "if(CountCode(Q1) == 1)"
Q2
Would you consider buying any other products of the same brand?
1 Item 1 /F "if(Q1!=1)"
2 Item 2 /F "if(Q1!=2)"
3 Item 3 /F "if(Q1!=3)"
4 Item 4 /F "if(Q1!=4)"
5 Item 5 /F "if(Q1!=5)"
6 Item 6 /F "if(Q1!=6)"
What are your feelings