- Posts: 57
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Single Choice with Question Validation
- scene143
- Topic Author
- Offline
- Senior Member
Less
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 8 months ago #203162
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 57
- Thank you received: 1
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.