# Working with Constants

5 years 5 months ago - 5 years 5 months ago #87634
StuartMark0 created the topic: Working with Constants
Hi guys,

I am working on the below scenario and applying a "constant" skip logic however so far it doesn't seem to be working.

So, I have 1 to 20 questions in my survey.
And, I do not want to show Q5 to Q10 if someone falls under below postcodes!

6280, 6284, 6285, 6286, 6288, 6290

Postcode question is Q1c: What postcode do you live in?

So far I tried:

(O1c.NAOK != "6280" or O1c.NAOK != "6284" or O1c.NAOK != "6285" or O1c.NAOK != "6286" or O1c.NAOK != "6288" or O1c.NAOK != "6290"))

and this equations as well,
((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")))

So far no luck...

Any help will be highly appreciated.

Cheers,
Mark.
Last Edit: 5 years 5 months ago by StuartMark0. Reason: Update

5 years 5 months ago - 5 years 5 months ago #87661 by tpartner
tpartner replied the topic: Working with Constants
Try:
`(Q1c.shown != '6280' and Q1c.shown != '6284' and Q1c.shown != '6285' and Q1c.shown != '6286' and Q1c.shown != '6288' and Q1c.shown != '6290')`

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