Check out the LimeSurvey source code on GitHub!

Multiple conditions don't work

More
5 years 6 months ago #64969 by hotcakes
I'm setting up a survey that has a few questions that should only be seen if certain conditions are met. The logic is as follows:
Q1: Do you smoke?
Yes
Sometimes
Never

Q2: Do you drink?
Yes
Sometimes
Never

Q3: Why do you smoke and drink?

So question 3 should ONLY be seen in you DON'T answer never to BOTH Q1 and Q2.

The condition should be set up as:
If Q1 is not equal to never
OR
If Q2 is not equal to never
Show Q3

HOWEVER... my big issue is that in Limesurvey 1.91, I can't seem to do this. The only operations option is AND (which doesn't work). I can't seem to change the AND to an OR. And I can't find any kind of "advanced" option to let me do it manually. I'm stuck!!

Please help!

Please Log in to join the conversation.

More
5 years 6 months ago #64970 by holch
Currently, I think there is no OR option. There is a project that is called "Expressionengine" which seems to cover that, but will only be implemented into one of the future releases, as far as I know.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 6 months ago #64973 by paulfiner
Surely the logic for Q3 to be shown should be Q1 is not equal to Never AND Q2 is not equal to Never.

If you do really want to use OR then do this:

Set the condition to be Q1 not equal to Never
Click on the little + button to the left of where it says Scenario. This will then show a field with a number 1 in it.
Change the 1 to a 2 and create the second condition of Q2 not equal to Never and click 'Add condition' at the bottom.

This will then show a summary of your scenarios which will use OR as the condition.

Cheers

Paul
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
5 years 6 months ago #65004 by hotcakes
Thank you for the information. All this logic is giving me a headache. :) I misspoke when I wrote my fake scenario on here.

What I meant to say is Q3 should only be shown if I they don't answer "Never" to either Q1 OR Q2 or both. In other words, if they answer "Never" to both questions, it should skip Q3

So, the logic is NOT "Q1 is not equal to Never AND Q2 is not equal to Never". With that logic, answering only one of them as "never" would skip the question.

I will test out the "OR" logic trick you posted.

Thanks

Please Log in to join the conversation.

More
5 years 6 months ago #65015 by vadindot
what you need to use is scenarios

first create the condition Q1 not equal to Never

then click on the + next to Scenario to create Scenario 2: Q2 not equal to never

Please Log in to join the conversation.

More
5 years 6 months ago #65017 by hotcakes
It looks like this worked. Thanks.

This is not at all user friendly. It is perhaps the worst example of interaction design I have seen. Someone needs to do a better job of making this work, or at the very least, add some clear documentation on how this works.

Please Log in to join the conversation.

More
5 years 6 months ago #65018 by vadindot
it gets easier as you get used to it

the new expression thingamajig will really help

Please Log in to join the conversation.

More
5 years 6 months ago #65022 by TMSWhite
You can find details of Expression Manager here .

It is now included in the 1.92 development branch (limesurvey_ci), and in a 1.91 branch (limesurvey_dev_tms), although only the 1.92 branch is likely to be maintained.

Please Log in to join the conversation.

More
5 years 6 months ago #65023 by holch

hotcakes wrote: It looks like this worked. Thanks.

This is not at all user friendly. It is perhaps the worst example of interaction design I have seen. Someone needs to do a better job of making this work, or at the very least, add some clear documentation on how this works.


The documentation is a wiki. Everyone who has a login to the forum can also write there. So the "someone" could be you... ;-)

Projects like Limesurvey only can exist when users give something back from time to time...

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
5 years 5 months ago - 5 years 5 months ago #65027 by tpartner

It is perhaps the worst example of interaction design I have seen. Someone needs to do a better job of making this work, or at the very least, add some clear documentation on how this works.

Instead of complaining about the FREE software, why don't you join the dev team and fix it.

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.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form