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
  • perfexcellent's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #172455 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
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #172458 by tpartner
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
  • perfexcellent's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #172527 by perfexcellent
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.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago - 5 years 8 months ago #172537 by tpartner
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.

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:

File Attachment:

File Name: limesurvey...3981.lss
File Size:83 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 8 months ago by tpartner.
The following user(s) said Thank You: perfexcellent
The topic has been locked.
  • perfexcellent
  • perfexcellent's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #172573 by perfexcellent
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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #172576 by tpartner
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.

Lime-years ahead

Online-surveys for every purse and purpose