- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Question still displayed even when Relevance Equation = 0
- perfexcellent
- Topic Author
- Offline
- New Member
Less
More
5 years 8 months ago #172455
by perfexcellent
Question still displayed even when Relevance Equation = 0 was created by perfexcellent
Hello folks,
Here's the scenario
- I have designed a set of questions in the form of an assessment.
- I want to present the respondent a customised (their company name) page that depends on their assessment score.
I created at question group called RESULTS with the following questions
- score: (equation) this stores the value of the current assessment {ASSESSMENT_CURRENT_TOTAL}
- laggard: (text display) with relevance equation if(ASSESSMENT_CURRENT_TOTAL <-6,1,0)
- lukewarm: (text display) with relevance equation if((ASSESSMENT_CURRENT_TOTAL >-7) AND (ASSESSMENT_CURRENT_TOTAL <15),1,0)
- leader: (text display) with relevance equation if(ASSESSMENT_CURRENT_TOTAL >14,1,0)
Problem is that when the score is >14, it always shows the "lukewarm" or "leader" questions even though the relevance equations for those two evaluate to 0 (I used the if statement to force it to be 0)
What am I doing wrong? I've attached some screenshots
Grateful to anyone who can provide some insight.
This is on LS Version 3.14.1+180731
Here's the scenario
- I have designed a set of questions in the form of an assessment.
- I want to present the respondent a customised (their company name) page that depends on their assessment score.
I created at question group called RESULTS with the following questions
- score: (equation) this stores the value of the current assessment {ASSESSMENT_CURRENT_TOTAL}
- laggard: (text display) with relevance equation if(ASSESSMENT_CURRENT_TOTAL <-6,1,0)
- lukewarm: (text display) with relevance equation if((ASSESSMENT_CURRENT_TOTAL >-7) AND (ASSESSMENT_CURRENT_TOTAL <15),1,0)
- leader: (text display) with relevance equation if(ASSESSMENT_CURRENT_TOTAL >14,1,0)
Problem is that when the score is >14, it always shows the "lukewarm" or "leader" questions even though the relevance equations for those two evaluate to 0 (I used the if statement to force it to be 0)
What am I doing wrong? I've attached some screenshots
Grateful to anyone who can provide some insight.
This is on LS Version 3.14.1+180731
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 8 months ago #172458
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question still displayed even when Relevance Equation = 0
Personally, I would scrap the assessments and create your own "scores" in equation type questions with Expression Manager. You will find it much more versatile.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- perfexcellent
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 8 months ago #172527
by perfexcellent
Replied by perfexcellent on topic Question still displayed even when Relevance Equation = 0
Thanks Tony, that's actually what I did. I'm using Expression Manager (which by the way requires presence of at least one assessment.
My problem is with the relevance equations ... any help will be appreciated.
My problem is with the relevance equations ... any help will be appreciated.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 8 months ago - 5 years 8 months ago #172537
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question still displayed even when Relevance Equation = 0
According to your logic file, the "ASSESSMENT_CURRENT_TOTAL" variable is not defined. That may be a bug.
A workaround would be to use the Expression Manager sum() function and the qCode.value variable to calculate the value of the score equation question.
Then, you can use that question in your relevance equations:
Working survey attached:
A workaround would be to use the Expression Manager sum() function and the qCode.value variable to calculate the value of the score equation question.
Code:
{sum(v6position.value, NATiness.value, commitment.value, techskill.value, manskill.value, applytraining.value, Resources.value, supplier6.value, v6projects.value, procure6.value)}
Then, you can use that question in your relevance equations:
Code:
score < - 6
Code:
score > - 7 AND score < 15
Code:
score > 14
Working survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 5 years 8 months ago by tpartner.
The following user(s) said Thank You: perfexcellent
The topic has been locked.
- perfexcellent
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
5 years 8 months ago #172573
by perfexcellent
Replied by perfexcellent on topic Question still displayed even when Relevance Equation = 0
Thank you Tony! Problem solved.
Regarding {ASSESSMENT_CURRENT_TOTAL} being flagged as undefined. I think it's a bug.
The variable works when used in calculations elsewhere .
Where and how do I file a bug report?
Regarding {ASSESSMENT_CURRENT_TOTAL} being flagged as undefined. I think it's a bug.
The variable works when used in calculations elsewhere .
Where and how do I file a bug report?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
5 years 8 months ago #172576
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question still displayed even when Relevance Equation = 0
Go here -
bugs.limesurvey.org/
. You will be able to log in with your forum credentials. Include a small sample survey and screenshots as necessary.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.