Welcome to the LimeSurvey Community Forum

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

Survey Flow Breaks

  • PeteyPablo120
  • PeteyPablo120's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago - 6 years 4 months ago #161235 by PeteyPablo120
Survey Flow Breaks was created by PeteyPablo120
Hi, I love LimeSurvey however I can't seem to get my question flow logic working.

I'm getting stuck with the relevance equation syntax and I have a hard figuring out what is wrong with the syntax even
after reading the manual and using Google.

First I divide the participants in 5 groups. 1-4 are the manipulation groups, 5 is the control group.
random: [1] if(random > 0, random, rand(1, 5))

With these groups I want to accomplish 2 things:

- Show some questions(groups) only to participants in group 1 to 4 and not the control group
- If a participant in group 1-4 answers "Nee" ("No" in Dutch) asking if they noticed the manipulation, exit the survey for them as they can't answer the rest of the questions.

I can show questions to group 1-4 only with "random!=5" in the relevance equation.
However I get stuck checking if a user is in Group 5 (and therefore needs to see the question)
OR is in group 1-4 and has answered "Ja" (Yes) on a question to check if they have seen the manipulation, in which case they still participate.


The code I have used in the relevance equation: random==5 OR adseecheck=="Ja"
and many variations but I can't get it to work and have a hard time debugging it.


The question on which Group 1-4 needs to answer "Ja"(Means Yes) or the rest of the questions should get skipped for them.
Question code: adseecheck
code answer option
A1 Ja
A2 Nee


My survey flow is the following:

Introduction
- Instructions
- (hidden) Randomized groups with: if(random > 0, random, rand(1, 5))
- Video Displayed: Group 1 to 4 see a manipulation video (each group has a different one) + main video, Group 5 sees only the main video as a control group
- Group 1-4 get's asked if they noticed the manipulation video, if they answer no the survey should end here for them, Group 5 should not see this question
- Group 1-4 get's a question group about the manipulation video, Group 5 should not see this
- Question group about the main video for Group 1 - 5.
- General question group for Group 1 - 5.
- Survey End

Thank you! :)
Last edit: 6 years 4 months ago by PeteyPablo120. Reason: Clarity
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #161237 by tpartner
Replied by tpartner on topic Survey Flow Breaks
You need to use the answer code in the relevance equation. So, something like:

Code:
random == 5 OR adseecheck == 'A1'

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • PeteyPablo120
  • PeteyPablo120's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #161239 by PeteyPablo120
Replied by PeteyPablo120 on topic Survey Flow Breaks
Thank you for your response! :) it works for Group 1-4 however not for Group 5. Group 5 skips over the questions with "random == 5 OR adseecheck == 'A1' "

Group 5 never answers the "ad see check" question because it is not relevant to them.
Can this be what causes the equation to break for Group 5?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #161240 by tpartner
Replied by tpartner on topic Survey Flow Breaks
Please refer to the manual. Use "NAOK" for questions that can be hidden - manual.limesurvey.org/Expression_Manager#Usage_of_NAOK

Code:
random == '5' OR adseecheck.NAOK == 'A1'

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • PeteyPablo120
  • PeteyPablo120's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #161245 by PeteyPablo120
Replied by PeteyPablo120 on topic Survey Flow Breaks
Thank you, got it now! Tried it before but probably something else was wrong leading me to believe it was not the solution.

Enjoy your weekend.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose