Working with number logic checks

More
4 years 10 months ago #86303 by StuartMark0
StuartMark0 created the topic: Working with number logic checks
Hi,

I’m trying to write a skip condition that tests if one of two criteria are being met then they are not asked a particular question.

The first criteria is that a question has a value of no. The second criteria is that a question has a value of yes, but also that a number being pre-entered in a previous question is not one of the following numbers - 6230, 6231, 6280, 6284, 6285, 6286, 6288, 6290.

I have entered the relevance equation below:
((q1== "N") OR ((Q1c != "6230, 6231, 6280, 6284, 6285, 6286, 6288, 6290 ") and (O1a == "Y")))

This currently evaluates the first condition correctly but doesn’t do so for the second one.

Is there something obvious I am missing here, or is there another (better) way to try and evaluate this condition?

Any help would be much appreciated.
Mark Stuart.

Please Log in to join the conversation.

More
4 years 10 months ago - 4 years 10 months ago #86379 by tpartner
tpartner replied the topic: Working with number logic checks
Try:
((q1== "N") OR ((Q1c != "6230") and (Q1c != "6231") and (Q1c != "6280") and (Q1c != "6284") and (Q1c != "6285") and (Q1c != "6286") and (Q1c != "6288") and (Q1c != "6290") and (O1a == "Y")))

Also, is the "O1a" question code correct?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 4 years 10 months ago by tpartner.

Please Log in to join the conversation.

More
4 years 10 months ago #86437 by StuartMark0
StuartMark0 replied the topic: Working with number logic checks
Thanks Tony!

Questions code is "q1a" - is that what you meant?

Cheers,
Mark.

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now