Simple relevance equation that uses multiple radio lists questions not working

3 years 7 months ago #99187 by nonlinear314
I have a fairly simple questionnaire with a couple of simple skip requests that I can't get to work and it is driving me mad. I have tried using numeric codes, string codes, nothing seems to work.


There is a group (call it GA) of simple questions with list/radio select one responses: Q1, Q2 and Q3

There is a group (GB) following the three questions.

Q1/Q2/Q3 all have the same answer codes: 1/2/3 (or A1/A2/A3, A/B/C, X/Y/Z, whatever)

Say Q2 gets skipped if Q1 == 1

Everyone gets asked Q3

Now, assume group GB only gets asked if Q1 == 1 or Q2 == 2 (for example)

For the relevance equation in GB I put: Q1 == 1 or Q2 == 2

The group will not get asked. Is it because Q2 is being skipped? Should I make an equation questions that is true if "Q1 == 1 and Q2 == 2" and false otherwise and use that question for relevance?

I tried adding is_empty checks with no luck. If I remove the "or" and try both statements individually than works for each one but not with both, or it might work for the first instruction (before the or) but not for the second. Like I said I've tried both numeric and string codes (e.g. 1 and "A1"), different ways of wording the same expressions and nothing works.

I've tried all kinds of things like checking is_empty, multiple ways of or and ! combos to try and get it to work.

It seems like a simple skip pattern. What am I missing?

Please Log in to join the conversation.

3 years 7 months ago - 3 years 7 months ago #99188 by nonlinear314
Looks like after a little more digging I found the answer.

I needed to append NAOK to the skipped questions in the relevance equation (I had both a group level and question level instance) and everything worked:

Q1.NAOK == 1 or Q2.NAOK == 2

Holy cannoli that was driving me bonkers.

I am assuming that the proper equation would be:

Q1 == 1 or Q2.NAOK == 2

since Q2 is the question that is potentially skipped.
Last Edit: 3 years 7 months ago by nonlinear314.

Please Log in to join the conversation.

3 years 7 months ago #99200 by DenisChenu
I always add .NAOK ;) even if question are always shown.

But here : i think you must update your question code: question code MUST be unique if you use EM.

GAQ1,GAQ2,GAQ3 ...
GBQ1,GBQ2 etc ....

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

3 years 7 months ago #99214 by nonlinear314
Thanks for the tip/response. I (or my clients) use unique question names based on the group name I just used Q1/Q2/Q3 to simplify the example.

Please Log in to join the conversation.