Welcome, Guest
Username: Password: Remember me

TOPIC: Relevance equation of Equation question type

Relevance equation of Equation question type 7 months 4 weeks ago #104358

  • jonaskoeppel
  • jonaskoeppel's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 31
  • Thank you received: 1
  • Karma: 0
Dear community,

I encountered a more or less severe problem today. I'm using questions of the type Equation to calculate indexes based on previous answers. For the indexes to be correct they should be calculated only if certain conditions are met (previous questions answered, etc.). So I use the Relevance Equation of the corresponding question which works fine in the survey. If the conditions aren't met, the Equation question doesn't show.

Now my problem: I realized that the corresponding fields of the irrelevant questions aren't NULLED in the database. Sometimes the value is set to "0", sometimes to "NAN". So apparently the Relevance Equation of this question type doesn't work properly.

Can anyone tell me if this is a planned behavior of LS or a bug?

Maybe I've got to mention that I've got the $deletenonvalues setting deactivated but this doesn't cause problems with other question types. I've deactivated it because I need information being saved even if the question group becomes irrelevant afterwards. Now if I do that, the values of the Equation questions are set to "0" or "NAN" while the information of other question types is preserved as wanted.

Thanks in advance for your answers!

Jonas
Last Edit: 7 months 4 weeks ago by jonaskoeppel.
The administrator has disabled public write access.

Relevance equation of Equation question type 7 months 4 weeks ago #104359

  • jonaskoeppel
  • jonaskoeppel's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 31
  • Thank you received: 1
  • Karma: 0
Forgot to add the survey file. If I run this survey and answer the first question (test1) with "No" (or no answer) the value in the database for the third question (test3) is "0".

File Attachment:

File Name: test_relevance_equation.lss
File Size: 13 KB
The administrator has disabled public write access.

Relevance equation of Equation question type 7 months 4 weeks ago #104360

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6360
  • Thank you received: 826
  • Karma: 245
Hi Jonas,

Seams you're rigth ....
ANd more : if you put {test2.NAOK * 20 + 30} for Équation : 30 is set to Answer.

No problem with deletenonvalue at true.

I'm not sure it can be easily fix, but i think if Équation question are never shown : we must let NULL inside value.
I test with Équation in a second group : same thing here.

Denis
The administrator has disabled public write access.

Relevance equation of Equation question type 7 months 4 weeks ago #104362

  • jonaskoeppel
  • jonaskoeppel's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 31
  • Thank you received: 1
  • Karma: 0
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu

Relevance equation of Equation question type 7 months 3 weeks ago #104430

  • jonaskoeppel
  • jonaskoeppel's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 31
  • Thank you received: 1
  • Karma: 0
Since the bug report was closed (won't fix) and I don't dare to reopen it again I'm continuing here since for me, unfortunately, the issue isn't resolved.

In fact, the way I see it or at least the reason I deactivated deletenonvalues is because I want to preserve the information once saved even if the question becomes irrelevant. With the actual behavior of the Equation question though, my values aren't preserved anymore but overwritten by senseless values (0, NAN). So for me, following this logic, the equation shouldn't evaluate at all instead of cleaning it up retrospectively.

I understand the hesitations of Carsten very well though, it seems not to be a simple bug. So I ask myself, what can I do to fix this for my purpose? Does the plug-in you mentioned, Denis, follow the same logic?

Thanks a lot for your support!

Jonas
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.114 seconds
Donation Image