- Posts: 6
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Using relevanceStatus in relevance equations of further questions
- AlbanCatry
- Topic Author
- Offline
- New Member
Less
More
4 years 5 months ago - 4 years 5 months ago #190428
by AlbanCatry
Using relevanceStatus in relevance equations of further questions was created by AlbanCatry
Hello,
I am using Limesurvey 3.9.3 on limesurvey.com.
I have a problem with a quite complex survey where I have used "relevanceStatus" to check if a previous question has appeared or not. The relevance equation for Q3 looks like this : (Q2_SQ001.relevanceStatus == 0 and Q2_SQ002.relevanceStatus == 0)
The question Q3 appears and can be answered, but is not saved in the answer database. It is not even saved when going forward to the next group and backward. Question Q4 is correctly saved.
I have the feeling that, at one point, the relevanceStatus internally changes and disables some questions, discarding their answers. But I can't explain.
Is there something that could be done ?
Thanks a lot
Note : I know I could have copied/pasted the relevance equations but there are cascading questions each one with complex relevances that would lead to exploding size of equations...
I am using Limesurvey 3.9.3 on limesurvey.com.
I have a problem with a quite complex survey where I have used "relevanceStatus" to check if a previous question has appeared or not. The relevance equation for Q3 looks like this : (Q2_SQ001.relevanceStatus == 0 and Q2_SQ002.relevanceStatus == 0)
The question Q3 appears and can be answered, but is not saved in the answer database. It is not even saved when going forward to the next group and backward. Question Q4 is correctly saved.
I have the feeling that, at one point, the relevanceStatus internally changes and disables some questions, discarding their answers. But I can't explain.
Is there something that could be done ?
Thanks a lot
Note : I know I could have copied/pasted the relevance equations but there are cascading questions each one with complex relevances that would lead to exploding size of equations...
Last edit: 4 years 5 months ago by AlbanCatry.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 5 months ago - 4 years 5 months ago #190437
by DenisChenu
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 Using relevanceStatus in relevance equations of further questions
Try with
(checked in 3.19.3)
relevanceStatus are already a true/false system.
And compare number with boolean can be hard.
For example : we need allow 0 to be entered in a numerci value. 0 !== empty for LimeSurvey …
Code:
(Q2_SQ001.relevanceStatus and Q2_SQ002.relevanceStatus)
relevanceStatus are already a true/false system.
And compare number with boolean can be hard.
For example : we need allow 0 to be entered in a numerci value. 0 !== empty for LimeSurvey …
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: 4 years 5 months ago by DenisChenu.
The topic has been locked.
- gabrieljenik
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 272
- Thank you received: 45
4 years 5 months ago #190439
by gabrieljenik
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
Replied by gabrieljenik on topic Using relevanceStatus in relevance equations of further questions
Are other questions not being saved as well? If the survey is complex (large), check the max_input_vars setting.
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
The topic has been locked.
- AlbanCatry
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 3
4 years 5 months ago #190443
by AlbanCatry
Replied by AlbanCatry on topic Using relevanceStatus in relevance equations of further questions
Hello,
Thanks a lot DenisChenu for your answer. Indeed, relevanceStatus == 0 gave me the false impression to work.
If I change to : (!Q2_SQ001.relevanceStatus and !Q2_SQ002.relevanceStatus), the answers are correctly saved.
It also works correctly on my way more complex survey.
Also, thanks gabrieljenik for your answer ; all answers not related to the "relevanceStatus" were correctly saved, so it was not linked to the max_input_vars setting.
I was wondering if it would be interesting to change the text in the page :
manual.limesurvey.org/Expression_Manager
".relevanceStatus - whether or not the question is currently relevant (1 if true, 0 if false)" to be changed by :
".relevanceStatus - whether or not the question is currently relevant (boolean)"
It is a wiki, so I suppose I could change it, but I am a bit new to the community so I ask for permission
Alban
Thanks a lot DenisChenu for your answer. Indeed, relevanceStatus == 0 gave me the false impression to work.
If I change to : (!Q2_SQ001.relevanceStatus and !Q2_SQ002.relevanceStatus), the answers are correctly saved.
It also works correctly on my way more complex survey.
Also, thanks gabrieljenik for your answer ; all answers not related to the "relevanceStatus" were correctly saved, so it was not linked to the max_input_vars setting.
I was wondering if it would be interesting to change the text in the page :
manual.limesurvey.org/Expression_Manager
".relevanceStatus - whether or not the question is currently relevant (1 if true, 0 if false)" to be changed by :
".relevanceStatus - whether or not the question is currently relevant (boolean)"
It is a wiki, so I suppose I could change it, but I am a bit new to the community so I ask for permission
Alban
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 5 months ago #190455
by DenisChenu
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 Using relevanceStatus in relevance equations of further questions
Good idea .
I do it …
Please : can you create a bug report with your issue . We already have issue with condition different in JS and PHP (it's the original issue here)
I do it …
Please : can you create a bug report with your issue . We already have issue with condition different in JS and PHP (it's the original issue here)
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.
- AlbanCatry
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 3
4 years 5 months ago #190562
by AlbanCatry
Replied by AlbanCatry on topic Using relevanceStatus in relevance equations of further questions
The topic has been locked.