- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Problem creating conditions with OR
- mikestrat
- Topic Author
- Offline
- New Member
Less
More
5 years 5 months ago - 5 years 5 months ago #177062
by mikestrat
Problem creating conditions with OR was created by mikestrat
Hello,
I'm having trouble setting up a survey:
I've tried manually entering an expression and using the condition manager as well but unfortunately to no avail.
So Q00010 relevance equation has been setup through the condition manager like this:
the 3 previous questions have a list from 0-10
question 10 gets displayed if the selected values are <= 6 but also when they are equal to 10!!! How is this possible?
I'm having trouble setting up a survey:
I've tried manually entering an expression and using the condition manager as well but unfortunately to no avail.
So Q00010 relevance equation has been setup through the condition manager like this:
Code:
((( ! is_empty(Q00007.NAOK) && (Q00007.NAOK <= "A7")))) or ((( ! is_empty(Q00008.NAOK) && (Q00008.NAOK <= "A7")))) or ((( ! is_empty(Q00009.NAOK) && (Q00009.NAOK <= "A7"))))
the 3 previous questions have a list from 0-10
question 10 gets displayed if the selected values are <= 6 but also when they are equal to 10!!! How is this possible?
Last edit: 5 years 5 months ago by mikestrat.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 5 months ago #177063
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Problem creating conditions with OR
Please export the relevant questions as a survey (LSS file) and state the version of LimeSurvey you use.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- mikestrat
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 5 months ago #177064
by mikestrat
Replied by mikestrat on topic Problem creating conditions with OR
thanks for the quick reply
version Version 3.15.5+181115
lss attached
version Version 3.15.5+181115
lss attached
Attachments:
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 5 months ago #177068
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Problem creating conditions with OR
Not only 10, but also 9 is displaying the question. (The only once with answercodes with 3 characters 9=A10 10=A11).
If the less equal is working on Answercodes which are not number (A9 vs 9), it could be a bug.
Try this:
Change answercodes of Q00007-9 from A1 to 0, A2 to1,2,3 etc.
That way you can compare number to number (Q00007.NAOK <= 6)
There are other ways to do it.
If the less equal is working on Answercodes which are not number (A9 vs 9), it could be a bug.
Try this:
Change answercodes of Q00007-9 from A1 to 0, A2 to1,2,3 etc.
That way you can compare number to number (Q00007.NAOK <= 6)
There are other ways to do it.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: mikestrat
The topic has been locked.
- mikestrat
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 5 months ago #177069
by mikestrat
Replied by mikestrat on topic Problem creating conditions with OR
changing the answer codes from A1 to 0, A2 to 1 etc worked!!! Thanks a lot, i've wasted too much time on this issue.
However I still dont understand why that happened. I thought the comparison Q01.NAOK checked the value of the answer
However I still dont understand why that happened. I thought the comparison Q01.NAOK checked the value of the answer
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 5 months ago - 5 years 5 months ago #177070
by jelo
When I use a to k as answercodes it is working fine with less equal Q00007.NAOK <= "g" fine via the condition designer.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Problem creating conditions with OR
I'm currently not sure. It seems to work in your example with answercodes with the length of two. A1-A9. Only A10 and A11 did show issues. We will find out.mikestrat wrote: I thought the comparison Q01.NAOK checked the value of the answer
When I use a to k as answercodes it is working fine with less equal Q00007.NAOK <= "g" fine via the condition designer.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 5 years 5 months ago by jelo.
The following user(s) said Thank You: mikestrat
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 5 months ago #177071
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Problem creating conditions with OR
When I use A01 instead of A1 etc. it seems to work. Funny.
I seldom use the condition manager. But I remember how I did it.
With single choice questions you can use eqal to and select more than one answer.
That way you get something like this. Which is how I would do it when having "mixed" answercodes.
There is still a bug with the condition designer. When entering the designer you will need to hit the browser refresh button to ensure that all form elements are correctly shown.
I seldom use the condition manager. But I remember how I did it.
With single choice questions you can use eqal to and select more than one answer.
That way you get something like this. Which is how I would do it when having "mixed" answercodes.
Code:
((Q00007.NAOK == "A01" or Q00007.NAOK == "A02" or Q00007.NAOK == "A03" or Q00007.NAOK == "A04" or Q00007.NAOK == "A05" or Q00007.NAOK == "A06" or Q00007.NAOK == "A07"))
There is still a bug with the condition designer. When entering the designer you will need to hit the browser refresh button to ensure that all form elements are correctly shown.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Attachments:
The following user(s) said Thank You: mikestrat
The topic has been locked.
- mikestrat
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 5 months ago #177072
by mikestrat
Replied by mikestrat on topic Problem creating conditions with OR
Thanks once again for your help jelo, I really appreciate it.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 4 months ago #177081
by DenisChenu
Bug reported ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Problem creating conditions with OR
Not reallyjelo wrote: When I use A01 instead of A1 etc. it seems to work. Funny.
Bug reported ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 4 months ago #177086
by jelo
But what do I know.
ExpressionScript (EM) is the drunk elephant in the room. You can't ignore that forever.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Problem creating conditions with OR
In my mental model of LimeSurvey "Q00007.NAOK <= "A7"" shouldn't be working at all.DenisChenu wrote: Not really Bug reported ?
But what do I know.
ExpressionScript (EM) is the drunk elephant in the room. You can't ignore that forever.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
5 years 4 months ago - 5 years 4 months ago #177088
by DenisChenu
Sorry think i missunderstanding the issue .
Q00007.NAOK <= "A7" can/must work , comparaison is done via character
But then
A1 > A02 for example
or A2 > A10
It's not an issue
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Problem creating conditions with OR
Oups,jelo wrote: In my mental model of LimeSurvey "Q00007.NAOK <= "A7"" shouldn't be working at all.
Sorry think i missunderstanding the issue .
Q00007.NAOK <= "A7" can/must work , comparaison is done via character
But then
A1 > A02 for example
or A2 > A10
Because : A10 < A7 …question 10 gets displayed if the selected values are <= 6 but also when they are equal to 10!!! How is this possible?
It's not an issue
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 4 months ago by DenisChenu.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 4 months ago #177094
by jelo
That adds confusion. I wonder why that issue is now open for more than three months.
Might be fixed in 3.15.4.
bugs.limesurvey.org/view.php?id=14239
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Problem creating conditions with OR
For users of the condition manager, the main issue is the buggy display of the answeroptions (Workaround reload via browser function). bugs.limesurvey.org/view.php?id=13940DenisChenu wrote: It's not an issue
That adds confusion. I wonder why that issue is now open for more than three months.
Might be fixed in 3.15.4.
bugs.limesurvey.org/view.php?id=14239
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.