- Posts: 36
- Thank you received: 4
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Nested conditions
- advanz_lu
- Topic Author
- Offline
- Junior Member
Less
More
5 years 4 months ago #176982
by advanz_lu
Nested conditions was created by advanz_lu
Hello everybody,
I have a the following design:
Q1 - Answer (yes|no)
Q2 - ((Q1.NAOK == "A2")) i.e. appears if Q1 = no : Answer (yes|no)
Q3 - ((Q2.NAOK == "A2")) i.e. appears if Q2 = no
In longhand:
The answers to Q1 are "yes" OR "no"
If the answer to Q1 is "no" I ask Q2
The answers to Q2 are "yes" OR "no"
If the answer to Q2 is "no" I ask Q3
If the subject answers question 1 with "no" ; question 2 with "no"
and then goes back and changes the answer to question 1 to "yes"
I still see question 3 on the screen.
Is there a way of making sure that question 3 is not shown if the answer to question 1 is changed from "no" to "yes" ?
Thanks,
-Graham-
I have a the following design:
Q1 - Answer (yes|no)
Q2 - ((Q1.NAOK == "A2")) i.e. appears if Q1 = no : Answer (yes|no)
Q3 - ((Q2.NAOK == "A2")) i.e. appears if Q2 = no
In longhand:
The answers to Q1 are "yes" OR "no"
If the answer to Q1 is "no" I ask Q2
The answers to Q2 are "yes" OR "no"
If the answer to Q2 is "no" I ask Q3
If the subject answers question 1 with "no" ; question 2 with "no"
and then goes back and changes the answer to question 1 to "yes"
I still see question 3 on the screen.
Is there a way of making sure that question 3 is not shown if the answer to question 1 is changed from "no" to "yes" ?
Thanks,
-Graham-
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
5 years 4 months ago #176984
by jelo
Can you provide the Version of LimeSurvey you use and a demo survey with just these questions (LSS-export)?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Nested conditions
That can be a bug or an issue related to ExpressionScript (soon to be name for ExpressionManager).advanz_lu wrote: If the subject answers question 1 with "no" ; question 2 with "no"
and then goes back and changes the answer to question 1 to "yes" I still see question 3 on the screen
Can you provide the Version of LimeSurvey you use and a demo survey with just these questions (LSS-export)?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- advanz_lu
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 4
5 years 4 months ago #176987
by advanz_lu
Replied by advanz_lu on topic Nested conditions
I'm running Version 3.15.3+181108
I just uploaded the demo "Nested Conditions" .
Try it with
Q180 yes
Q181 yes
Q180 no
(Q184 - "How much did it cost" is still there)
Then Ctrl-F5 and
Q180 no
Q181 no
Q180 yes
(Q182 - "What is the reason for not applying..." is still there)
Any ideas?
Thanks
-Graham-
I just uploaded the demo "Nested Conditions" .
Try it with
Q180 yes
Q181 yes
Q180 no
(Q184 - "How much did it cost" is still there)
Then Ctrl-F5 and
Q180 no
Q181 no
Q180 yes
(Q182 - "What is the reason for not applying..." is still there)
Any ideas?
Thanks
-Graham-
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
5 years 4 months ago - 5 years 4 months ago #176988
by jelo
In an earlier post you wrote
A Survey-URL with&newtest=Y (which is used when you click the preview button) will use a new session.
Most respondents are used to the fact that reload button shouldn't be use in surveys.
But more and more webapplications are using GET parameter do handle even browser controls.
LimeSurvey is currently not able to handle browsercontrols (like back/forth, reload).
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Nested conditions
Thanks, I have attached your survey here in the thread. The demo installation is reset from time to time.advanz_lu wrote: I'm running Version 3.15.3+181108
I just uploaded the demo "Nested Conditions" .
You cannot use the refresh function of the browser to reset the session and answers.advanz_lu wrote: Then Ctrl-F5 and
In an earlier post you wrote
which is a different thing that Ctrl+F5.advanz_lu wrote: then goes back and changes the answer
A Survey-URL with&newtest=Y (which is used when you click the preview button) will use a new session.
Most respondents are used to the fact that reload button shouldn't be use in surveys.
But more and more webapplications are using GET parameter do handle even browser controls.
LimeSurvey is currently not able to handle browsercontrols (like back/forth, reload).
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Attachments:
Last edit: 5 years 4 months ago by jelo.
The topic has been locked.
- advanz_lu
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 4
5 years 4 months ago #176989
by advanz_lu
Replied by advanz_lu on topic Nested conditions
NO, I wasn't talking about the users using the Ctrl-F5 - I gave this for you to see the results of the different manipulations - yes, yes, no and no, no, yes.
When I said "the user goes back" I meant that the user selects yes, yes, no and then changes the first yes to no
OR the user selects no, no, yes and then changes the first no to yes.
Sorry if that wasn't clear.
-Graham-
When I said "the user goes back" I meant that the user selects yes, yes, no and then changes the first yes to no
OR the user selects no, no, yes and then changes the first no to yes.
Sorry if that wasn't clear.
-Graham-
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
5 years 4 months ago #176990
by jelo
Now to your main issue.
You can add more conditions or even better switch to relevance equations to check on more than one question.
You chose conditions. Why don't you just add another condition? In the same scenario you have a AND. If you choose a different scenario you have a OR.
The best approach is using question relevance.
E.g. a question is shown when Q180=A1 and Q181=A1 can be written as
Somestimes question releavance and conditions will not work with questions on the same page.
That is sometimes a bug. The workaround is to place questions in different groups. That way you prevent unclear answer situations.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Nested conditions
advanz_lu wrote: (Q182 - "What is the reason for not applying..." is still there)
Now to your main issue.
You can add more conditions or even better switch to relevance equations to check on more than one question.
You chose conditions. Why don't you just add another condition? In the same scenario you have a AND. If you choose a different scenario you have a OR.
The best approach is using question relevance.
E.g. a question is shown when Q180=A1 and Q181=A1 can be written as
Code:
(Q180.NAOK == "A1") && (Q181.NAOK == "A1")
Somestimes question releavance and conditions will not work with questions on the same page.
That is sometimes a bug. The workaround is to place questions in different groups. That way you prevent unclear answer situations.
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: f_funke
The topic has been locked.
- advanz_lu
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 4
5 years 4 months ago #176992
by advanz_lu
Replied by advanz_lu on topic Nested conditions
Great - thanks !
The AND works
-Graham-
The AND works
-Graham-
The topic has been locked.