Welcome to the LimeSurvey Community Forum

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

Question validation equation

More
4 hours 31 minutes ago #273606 by malmaz
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.13.3+250512
Own server or LimeSurvey hosting: owne server
Survey theme/template:Fruity
==================

I have a multiple choice question where some combinations of answers should be allowed and one specific combination should be blocked.

Question type: Multiple choice
Which of the following best describes your current situation? (Q1)
Answer options:
A1 – I am employed
A2 – I am studying
A3 – I am currently not employed

Allowed combinations:
A1 + A2
A2 + A3
Any single option
Not allowed combination:

A1 + A3 (employed AND not employed at the same time)

I want to:
the respondent should NOT be able to continue if A1 and A3 are selected together,
a clear validation message should be displayed explaining why this combination is not allowed.

I tried to use Question validation equation with the following condition:
Q1_A1 == "Y" and Q1_A3 == "Y"
but this does not work.

Please Log in to join the conversation.

More
4 hours 9 minutes ago #273607 by Joffm
Replied by Joffm on topic Question validation equation
Hi,

Q1_A1 == "Y" and Q1_A3 == "Y"

What does it mean? That ONLY the combination of A1 AND A3 is allowed.
You have to negate this because this combination is NOT allowed
Either - as we learned at school:  The negation of  A==1 AND A==3  is  A!=1 OR A!=3
Or more simple. Negate the whole term !(A==1 AND A==3)

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose