- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to skip a Ranking question when less than 2 options available
- tylerreed
- Topic Author
- Offline
- New Member
Less
More
1 year 3 months ago #239536
by tylerreed
How to skip a Ranking question when less than 2 options available was created by tylerreed
LimeSurvey version:
Version 5.4.12+221121
Own server or LimeSurvey hosting: Self-hosted
Survey theme/template: Default
==================
We have a multiple choice question: Which colors do you like? With 4 options (black, white, blue, red) and no constraints on how many the user can select.
We have a subsequent Ranking question that asks the users to rank the colors they selected in the multiple choice question
The Ranking question filters the appropriate answers, so if the user only selects "black" and "blue" options in the multiple choice questions, then those are the only 2 they see in the ranking question. Works great! And we have a condition setup so that if the user selects none of the colors, the ranking question is skipped.
However, if the user selects a single color (say "black"), the Ranking question then shows up with a single item to be ranked, "black". How can we skip the Ranking question is the Multiple Choice question has less than 2 selections?
Thanks,
Tyler
Own server or LimeSurvey hosting: Self-hosted
Survey theme/template: Default
==================
We have a multiple choice question: Which colors do you like? With 4 options (black, white, blue, red) and no constraints on how many the user can select.
We have a subsequent Ranking question that asks the users to rank the colors they selected in the multiple choice question
The Ranking question filters the appropriate answers, so if the user only selects "black" and "blue" options in the multiple choice questions, then those are the only 2 they see in the ranking question. Works great! And we have a condition setup so that if the user selects none of the colors, the ranking question is skipped.
However, if the user selects a single color (say "black"), the Ranking question then shows up with a single item to be ranked, "black". How can we skip the Ranking question is the Multiple Choice question has less than 2 selections?
Thanks,
Tyler
Please Log in to join the conversation.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
1 year 3 months ago #239544
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How to skip a Ranking question when less than 2 options available
Hi,
so you have to count the selected items.
In the implemented functions
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
you find the function "count" with the explanation "count the number of answered (non-blank) questions in the list"
And you display the ranking question if this count is greater than 1.
According this the condition is
count(Q1_SQ001,Q1_SQ002,Q1_SQ003,...)>1
Using the "that" variable
[url] manual.limesurvey.org/ExpressionScript_-....22that.22_variables [/url]
you only say
count(that.Q1)>1
Joffm
so you have to count the selected items.
In the implemented functions
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
you find the function "count" with the explanation "count the number of answered (non-blank) questions in the list"
And you display the ranking question if this count is greater than 1.
According this the condition is
count(Q1_SQ001,Q1_SQ002,Q1_SQ003,...)>1
Using the "that" variable
[url] manual.limesurvey.org/ExpressionScript_-....22that.22_variables [/url]
you only say
count(that.Q1)>1
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- tylerreed
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
1 year 3 months ago - 1 year 3 months ago #239553
by tylerreed
Replied by tylerreed on topic How to skip a Ranking question when less than 2 options available
Thanks Joffm, that's all it took! I just popped this in the Condition field: (count(that.G03Q05)>1 and (G02Q07.NAOK == "Y"))
Last edit: 1 year 3 months ago by tylerreed.
Please Log in to join the conversation.
- Tomypop
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
1 year 2 months ago - 10 months 6 days ago #239976
by Tomypop
<!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--> watch stories
<!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--> cc generator
Replied by Tomypop on topic How to skip a Ranking question when less than 2 options available
- To set Display or Skip Logic, select the question you wish to perform the action on and select Display logic or Skip logic under Question behavior menu.
- Display logic will display the selected question only if conditions are met.
<!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--> watch stories
<!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--> cc generator
Last edit: 10 months 6 days ago by Tomypop.
Please Log in to join the conversation.