# Working with number logic checks

5 years 7 months ago #86303
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.

5 years 7 months ago - 5 years 7 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: 5 years 7 months ago by tpartner.

5 years 7 months ago #86437
StuartMark0 replied the topic: Working with number logic checks
Thanks Tony!

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

Cheers,
Mark.