Conition "OR" - Can I replace it by "AND"?

More
3 months 4 hours ago #170288 by KMB_Janine
KMB_Janine created the topic: Conition "OR" - Can I replace it by "AND"?
Hello everybody,

I have a single choice question. But I only want it to show up, if certain answers were chosen in a previous question, namely every answer except of two. I have set the two conditions that the question should only pop up if the previous answer was NOT 1 and NOT 2. Unfortunately, LimeSurvey makes "not 1 OR not 2" out of it. Is there any way to change it? I have tried to set up two different conditions, too, but it does not work out, the question keeps popping up no matter what the answer was beforehand. Or is there an error in my way of thinking?

Thanks in advance!
Janine
Attachments:

Please Log in or Create an account to join the conversation.

More
3 months 4 hours ago #170289 by tpartner
tpartner replied the topic: Conition "OR" - Can I replace it by "AND"?
You can use a relevance equation instead of the conditions designer.

Judging by the screenshots, I think it would be:

Schluessel == 'Y' AND Wahrscheinlich != 'A1' AND Wahrscheinlich != 'A5'

Which effectively says show the question if:

Schluessel equals 'Y'
AND
Wahrscheinlich does not equal 'A1'
AND
Wahrscheinlich does not equal 'A5'

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #170651 by KMB_Janine
KMB_Janine replied the topic: Conition "OR" - Can I replace it by "AND"?
Thanks for your help! That makes sense. However, I tried to use the relevance equation, but the system tells me that two variables are undefined, although I used the exact code of the relevant question. Do you know what the problem there is? I tried renaming several times, but it is always the same problem.
Attachments:

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #170652 by KMB_Janine
KMB_Janine replied the topic: Conition "OR" - Can I replace it by "AND"?
Actually, now I got the equation itself accepted and working, but still - if going through the survey, the question keeps showing up, inspite of the answers in the question "Wahrscheinlichkeit"...

Attachments:

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #170654 by DenisChenu
DenisChenu replied the topic: Conition "OR" - Can I replace it by "AND"?
Looking at your equation : you test string, not value and "something == Y" is always true …

Seems you have subquestion for Wahrscheinlich1 ? Then maybe
Schluessel == 'Y' AND Wahrscheinlich1_SW0101 != 'A1' AND Wahrscheinlich1_SW0101 != 'A5'

But remind : we are not on your system : you must search and check manual

An,d you can (too) use GUI to use == in your condition ( =="A2" or =="A3" or =="A4" …)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!