Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Using the result of an equation in further questions (text / relevance)

  • AlbanCatry
  • AlbanCatry's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175762 by AlbanCatry
Hello,

I am trying to use the result of an equation to change the tet of a further question, and to make another further question appear or not.
I have seen the example of the manual :

manual.limesurvey.org/Expression_Manager...s_in_the_survey_data

The variable in the equation seems to compute correctly, it is displayed at runtime.
AllAnswered = ( ! is_empty(MyArray_SQ1) and ! is_empty(MyArray_SQ2) and ! is_empty(MyArray_SQ3))

But the further questions are not updated...
I have tried many things :
* It is not a NAOK problem, because all is visible (I have tried with NAOK anyway)
* I have tried with the variable affectation {AllAnswered = <myequation>} or without {<myequation>)
* I have tried using the direct boolean output of the equation, or convert it to int 0/1

Right now I am stuck and I feel I am missing something.

Can someone help me ?
Thanks a lot
Alban
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175767 by tpartner
Why are you using an assignment operator for "AllAnswered"?

Can you attach a small sample survey containing only the relevant questions?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • AlbanCatry
  • AlbanCatry's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175772 by AlbanCatry
I am very sorry I tried to attach an example but apparently I failed, here is another try.

File Attachment:

File Name: limesurvey...0-23.lss
File Size:23 KB
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago - 5 years 5 months ago #175774 by tpartner
This appears to be a bug. The client-side (JavaScript) processing of the value of the equation question does not seem to be working but the server-side (PHP) is working. If you move ahead and backwards in the survey, the relevance and tailoring works.

Please file a bug report.

In the meantime, using the equation directly in relevance does work.


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 5 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • AlbanCatry
  • AlbanCatry's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #175845 by AlbanCatry
Hello,
Thanks a lot for the answer
I thought I was doing something wrong but, since you say this is a bug, I have filled a bug report as you say.

I will use the formula in the relevance equation as you say, but I hope I will manage to do something with the equation because I have to copy this in a lot of relevance equations and this won't be clean in the long term.

Alban
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
5 years 5 months ago #175852 by jelo
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #175875 by DenisChenu
Hi,

Thank you for reporting bug, it's fixed in 4.0, but really too hard to fix it in 3.X .

Original issue : bugs.limesurvey.org/view.php?id=14047

The final fix depend on this one : github.com/LimeSurvey/LimeSurvey/commit/...72747b6a782f2cca68a7

And this one is not in master …

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.

Lime-years ahead

Online-surveys for every purse and purpose