- Posts: 12908
- Thank you received: 3970
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Display selected items from Multiple Choice in a later question
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
4 years 9 months ago - 4 years 9 months ago #186383
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Display selected items from Multiple Choice in a later question
Hi,
if you say you are using a radio button question, your approach "Q1_A1.xxxx" is not correct.
The Q1_A1 syntax means "A1" is the code of a subquestion of Q1.
How do you imagine LimeSurvey can know the "right" answer?
A simple "if-statement" will do it.
Let's say, "A4" is the correct answer:
{if(Q1!="A4","The correct answer is: 'Option 4'","Your answer is correct")}
Joffm
if you say you are using a radio button question, your approach "Q1_A1.xxxx" is not correct.
The Q1_A1 syntax means "A1" is the code of a subquestion of Q1.
How do you imagine LimeSurvey can know the "right" answer?
A simple "if-statement" will do it.
Let's say, "A4" is the correct answer:
{if(Q1!="A4","The correct answer is: 'Option 4'","Your answer is correct")}
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 4 years 9 months ago by Joffm.
The topic has been locked.
- LCGreenAlp
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 9 months ago #186396
by LCGreenAlp
Replied by LCGreenAlp on topic Display selected items from Multiple Choice in a later question
Hello
Thank you again. Your example works fine.
Have a nice day
Thank you again. Your example works fine.
Have a nice day
The topic has been locked.
- asilbering
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 1 month ago #194529
by asilbering
Replied by asilbering on topic Display selected items from Multiple Choice in a later question
Hi!
I need help on a related topic.
I have one multiple choice question (SSP) with many many subquestions (the number is variable but can be up to 100). I am using array filtering to display only the checked options in a subsequent array filter question (nivSSP, see sample survey attached).
The second question should only be displayed if any of the options except "non" has been checked in the first question.
Using relevance I have managed to hide the question if the option "non" is chosen. But if no option is chosen I can still see the question without any subquestions (see screen shot).
I was wondering if there is any way of saying that question two has to be displayed if any option was checked without having to list all subquestions. Using only the question code for relevance has not worked, and I don't want to have to list all subquestions in the relevance field. Am I missing something?
I hope you understand what I mean.
Thanks in advance for your help!
Best,
Ana
I need help on a related topic.
I have one multiple choice question (SSP) with many many subquestions (the number is variable but can be up to 100). I am using array filtering to display only the checked options in a subsequent array filter question (nivSSP, see sample survey attached).
The second question should only be displayed if any of the options except "non" has been checked in the first question.
Using relevance I have managed to hide the question if the option "non" is chosen. But if no option is chosen I can still see the question without any subquestions (see screen shot).
I was wondering if there is any way of saying that question two has to be displayed if any option was checked without having to list all subquestions. Using only the question code for relevance has not worked, and I don't want to have to list all subquestions in the relevance field. Am I missing something?
I hope you understand what I mean.
Thanks in advance for your help!
Best,
Ana
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10103
- Thank you received: 3591
4 years 1 month ago - 4 years 1 month ago #194530
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Display selected items from Multiple Choice in a later question
Try this:
The reserved 'this', 'self', and 'that' variables - manual.limesurvey.org/Expression_Manager....27that.27_variables
Code:
count(that.SSP) > 0 AND SSP_non != 'Y'
The reserved 'this', 'self', and 'that' variables - manual.limesurvey.org/Expression_Manager....27that.27_variables
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 1 month ago by tpartner.
The following user(s) said Thank You: asilbering
The topic has been locked.
- asilbering
- Offline
- Senior Member
Less
More
- Posts: 74
- Thank you received: 1
4 years 1 month ago #194532
by asilbering
Replied by asilbering on topic Display selected items from Multiple Choice in a later question
Thanks t.partner!
These functions are very useful!!
I had to use that.SSP.NAOK for it work.
These functions are very useful!!
I had to use that.SSP.NAOK for it work.
The topic has been locked.