Welcome to the LimeSurvey Community Forum

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

Single Choice with Question Validation

  • scene143
  • scene143's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago #203156 by scene143
Single Choice with Question Validation was created by scene143
Hi,


I have one single choice question which will have previous question logic.

I created a single choice radio button and try to write a Question validation but it's not working properly.


Here the Logic

Solus Homemade batter users Only 3 coded from S7c 1
Solus Unbranded batter users Only 1 coded from S7c 2
Solus Branded batter users Only 2 coded from S7c 3


S8 is a single choice and QS7c is a multi-choice question.

I tried this below syntax in the Question validation equation.

(if (QS8=="1",QS7c_SQ003=="Y" and QS7c_SQ001!="Y" and QS7c_SQ002!="Y"),
if (QS8=="2",QS7c_SQ001=="Y" and QS7c_SQ002!="Y" and QS7c_SQ003!="Y"),
if (QS8=="3",QS7c_SQ002=="Y" and QS7c_SQ001!="Y" and QS7c_SQ003!="Y"))

Can anyone help me with this Syntax?

Regards
Sara
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #203162 by tpartner
Replied by tpartner on topic Single Choice with Question Validation
I think this:

Code:
(QS8 == "1" AND QS7c_SQ003 == "Y" AND QS7c_SQ001 != "Y" AND QS7c_SQ002 != "Y")
OR
(QS8 == "2" AND QS7c_SQ001 == "Y" AND QS7c_SQ002 != "Y" AND QS7c_SQ003 != "Y")
OR
(QS8 == "3" AND QS7c_SQ002 == "Y" AND QS7c_SQ001 != "Y" AND QS7c_SQ003 != "Y")

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • scene143
  • scene143's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 8 months ago #203172 by scene143
Replied by scene143 on topic Single Choice with Question Validation
Thank you very much
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose