creating an "and" condition

More
1 month 4 weeks ago #173907 by yohay
yohay created the topic: creating an "and" condition
Hi,
I have a question which need to be shown based on a value from a previous answer
The logic is :
only show this question if answer is not "A" and answer is not "b"

I understand that I can't create a condition with an "AND" logic if it's based on the same question (only an "OR" condition can be set) so I've created an equation instead with an AND logic instead of an OR.
But now the question is hidden no matter what.

Can anyone have an idea why this is happened?

this is the equation:

((quest.NAOK != "ans1")) AND ((quest.NAOK != "ans2"))




Thanks in advance

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks ago #173914 by DenisChenu
DenisChenu replied the topic: creating an "and" condition
Seems OK for me …

screenshot of Question Logic file ?

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
1 month 4 weeks ago #173917 by Joffm
Joffm replied the topic: creating an "and" condition
Hi,
just to explain:

In the condition manager you have to create a new scenario to do this.

But nowadays - since we have the Expression Manager - it's a lot easier.

You created an question of type equation. Why? And it doesn't work?
Unless you do not show us exactly what you did, we cannot help.

But you do not need the equation.
Just enter your condition in the Relevance equation of the question.
So, if Q2 is only displayed if (Q1!=1 AND Q1!=2), enter this in the Relevance equation of Q2.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: yohay

Please Log in or Create an account to join the conversation.

More
2 weeks 2 days ago #176000 by yohay
yohay replied the topic: creating an "and" condition
Thank you both (quite late).

For some reason it didn't work perfectly with the Expression Manager but I did a workaround, turning the condition upside down and its working fine

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!