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

More
9 years 6 months ago #131262 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
The topic has been locked.
More
9 years 6 months ago - 9 years 6 months ago #131292 by holch
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:
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.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Last edit: 9 years 6 months ago by holch.
The topic has been locked.
More
9 years 6 months ago #131327 by marcgold
Thanks Holch - that was perfect
Did exactly what I wanted it to do.
The topic has been locked.
More
9 years 6 months ago #131341 by holch
Great that it worked for you.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose