Have an idea?

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

Grid Skip Logic Problem

Does anyone recognize the reason for this error?

I have a two-row, single column grid question. Both rows are selects - drop down style.

The following skip logic ... Q1_r1<>47 And Q1_r2<>29 ... generates this error:

The binary operator '<>' requires the same type of both the left and right sides

I checked the question source code and it shows ...
<option value="47" id="Q1_r1_c1_47">Washington
<option value="29" id="Q1_r2_c1_29">Other

The Sawtooth online manual, I believe, says to use ...
... for this case.

However, both of these options, plus Q1_r1_c1<>47 and Q1_r2_c1<>29, all generate the same above error. Can anyone point out what I've done wrong?
asked Jul 25, 2019 by Michael
Yes, I have seen this error before. When you have numeric and string mixed within the skip logic, you can generate this error.

I would have thought the following would work okay providing the response type at Q1 is numeric ...

Q1_r1_c1<>47 and Q1_r2_c1<>29

If you send me an extract of your ssi file, I'll take a look. Include Q1 and the skip.

Email to paulmoon@aapt.net.au
Just to clarify, referring to responses of a grid question always requires the row and column with the exception of radio buttons.  Radios only require one or the other depending on whether the grid question is set to row or column orientation.
I'm assuming numeric Zachary, and in that case both row and column need to be included?
Just tried ...
Q1_r1_c1<>47 And Q1_r2_c1<>29
... again and this time it achieved "success!"

Thanks for your answers. Both were correct.

1 Answer

0 votes
Very good to hear.

I was a little confused when you were saying Q1_r1_c1<>47 and Q1_r2_c1<>29 did not work? That's why I was needing to see your ssi file.

In future, if unsure of your variable names, look in the data section of the admin module or when in skip logic, start typing the variable name and the variable names start to appear in a drop down list.

Also make note of Zachary's point about when the "c" and "r" are to be used.

And of course, you can always come back to forum for help.
answered Jul 27, 2019 by Paul Moon Platinum (78,685 points)