- Posts: 84
- Thank you received: 9
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
show subquestions in an array based on previous Subquestions in the same array
- marcgold
- Topic Author
- Offline
- Premium Member
Less
More
8 years 1 month ago #131262
by marcgold
show subquestions in an array based on previous Subquestions in the same array was created by marcgold
Hi
Sorry if this has been covered else where, I looked but couldnt find anything that fitted.
What I would like to do is show / hide subquestions based on answers of other subquestions within the same array. I have been looking at relevance but cant figure out what needs to be done or if this is even possible.
We could do this as a series of List questions and the logic would be easy with all as a group, but we run all our surveys as One question at a time so that it stores in the DB after each page, so this type of array conditions would be so useful.
So for example.
S_Question 1 (1-Agree) (2) (3) (4) (5-Disagree)
S_Question 2 (1-Agree) (2) (3) (4) (5-Disagree) -> Only Show S_Question 2 if S_Question 1 = 1-Agree, 2 or 3
S_Question 3 (1-Agree) (2) (3) (4) (5-Disagree) -> Hide S_Question 3 if S_Question 1 = Agree, 2 or 3
S_Question 4 (1-Agree) (2) (3) (4) (5-Disagree)
S_Question 5 (1-Agree) (2) (3) (4) (5-Disagree)
Currently using Lime Survey Version 2.06+ Build 160129
Thanks in advance if anyone can solve this for me
Marc Gold
Sorry if this has been covered else where, I looked but couldnt find anything that fitted.
What I would like to do is show / hide subquestions based on answers of other subquestions within the same array. I have been looking at relevance but cant figure out what needs to be done or if this is even possible.
We could do this as a series of List questions and the logic would be easy with all as a group, but we run all our surveys as One question at a time so that it stores in the DB after each page, so this type of array conditions would be so useful.
So for example.
S_Question 1 (1-Agree) (2) (3) (4) (5-Disagree)
S_Question 2 (1-Agree) (2) (3) (4) (5-Disagree) -> Only Show S_Question 2 if S_Question 1 = 1-Agree, 2 or 3
S_Question 3 (1-Agree) (2) (3) (4) (5-Disagree) -> Hide S_Question 3 if S_Question 1 = Agree, 2 or 3
S_Question 4 (1-Agree) (2) (3) (4) (5-Disagree)
S_Question 5 (1-Agree) (2) (3) (4) (5-Disagree)
Currently using Lime Survey Version 2.06+ Build 160129
Thanks in advance if anyone can solve this for me
Marc Gold
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 1 month ago - 8 years 1 month ago #131292
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic show subquestions in an array based on previous Subquestions in the same array
You will need to use the relevance equations for subquestions, like described in this post:
www.limesurvey.org/forum/can-i-do-this-w...sult?start=15#131200
The relevance equation would look something like this:
I tested this and it works here in the example question that I have attached.
The relevance equation would look something like this:
Code:
G1Q3_1 == 1 OR G1Q3_1 == 2 OR G1Q3_1 == 3
I tested this and it works here in the example question that I have attached.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Attachments:
Last edit: 8 years 1 month ago by holch.
The topic has been locked.
- marcgold
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 84
- Thank you received: 9
8 years 1 month ago #131327
by marcgold
Replied by marcgold on topic show subquestions in an array based on previous Subquestions in the same array
Thanks Holch - that was perfect
Did exactly what I wanted it to do.
Did exactly what I wanted it to do.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 1 month ago #131341
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic show subquestions in an array based on previous Subquestions in the same array
Great that it worked for you.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.