Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Skip Logic with or statements

This seems like an easy thing to do, but I am still very new to Sawtooth so anyone's help is much appreciated. I am trying to program some skip logic that if one, two or all three of the following are selected, Q1_1, Q1_2, or Q1_3, then move onto Q2, but if none of them are selected  skip to Q3.

I have tried the following, but all three have to be selected to move to Q2. I need it to move to Q2 if just one, two or three of those options are selected.

(Q1_1=1) or (Q1_2=1) or (Q1_3=1), Skip to Q2
(Q1_1<>1) or (Q1_2<>1) or (Q1_3<>1), Skip to Q3

Both of these method result in having all three options needing to be selected to move to Q2 and if one or two are selected it skips to Q3.

Please let me know if this makes sense and thank you for your help.
asked Dec 6, 2016 by mmeads (200 points)
edited Dec 6, 2016 by mmeads
Two observations:

1.  The logical opposite of "A or B or C" is "!A and !B and !C", so you probably meant to use "and" instead of "or" in the Q3 skip logic.

2.  You don't actually need any Q3 skip logic in this scenario because skips are executed in order.  If you want the second skip to activate whenever the first skip does not, you can set the second skip to "Always skip."

With or without these changes, I'm unable to reproduce your problem.  The Q2 skip appears to work on my end.  Is there something on your Q2 page that might be causing the respondent to be skipped to Q3 when one of the Q1 options is not selected?
Thanks! That worked like a charm!

1 Answer

+2 votes
Your skip logic that skips to Q3 should have "and" logic instead of "or" logic. You want to make sure ALL three options are unchecked, so "and" logic is what you want.
answered Dec 6, 2016 by Jon Heaton Silver Sawtooth Software, Inc. (9,030 points)
Thanks! That worked like a charm!