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
  • marcgold's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 1 month 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.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago - 8 years 1 month 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.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 8 years 1 month ago by holch.
The topic has been locked.
  • marcgold
  • marcgold's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 1 month ago #131327 by marcgold
Thanks Holch - that was perfect
Did exactly what I wanted it to do.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #131341 by holch
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.

Lime-years ahead

Online-surveys for every purse and purpose