Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Array condition option in LimeSurvey

  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 2 months ago #149385 by ymca
Is there an array condition option in LimeSurvey?

for example:
if user answer "x" in the array then the next question show "y" question instead of hiding "y" question.

LS Version 4.2+
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
8 years 2 months ago #149419 by DenisChenu
Replied by DenisChenu on topic Array condition option in LimeSurvey
Really unclear ....

QCODE_SQ001_SQ001.NAOK=="x" ?

But please explain ...... in detail ....

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • ymca
  • ymca's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 2 months ago - 8 years 2 months ago #149551 by ymca
Replied by ymca on topic Array condition option in LimeSurvey
Sorry.

I know there is a condition option (I guess it's called "Skip Logic") that depending on the answer the user choose, he will get the next coresponding question.

Does it also work the same on array options?
For example:

Let say there are 15 questions in the survey.
First question is an array.
If the user answer "Deannan Troi = 6" it will get the next question (question 2 in the survey) in the survey,
if the user answer "Deannan Troi = 3" then he will get question 3 in the survey.

And if the user answer "Deannan Troi = 1" he will get to the end of the survey.

LS Version 4.2+
Last edit: 8 years 2 months ago by ymca.
The topic has been locked.
  • holch
  • holch's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #149553 by holch
Replied by holch on topic Array condition option in LimeSurvey
You can use conditions or expression manager for this. I recommend to use expression manager and relevance equations, because you are more flexible and once you know how it works it is also a lot faster.

Assuming "Deannan Troi" has the answer code 1 and the question is called "Q1", then a relevance equation like this should work for your question two (that should only show when Deannan Troi is 6:
Code:
Q1_1 == 6
Not tested! Just an example.

The Deannan Troi = 1 --> End of survey is a little bit more complicated. If there are no further questions, only question 2 and 3, then it is easy and you can just use the relevance equations. if there are many other questions it is probably better to use a zero quota which would "screen out" respondents that answer 1 for Deannan Troi.

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 following user(s) said Thank You: DenisChenu, ymca
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose