- Posts: 40
- Thank you received: 4
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Equation question not working
1 year 2 months ago - 1 year 2 months ago #225939
by ployrich
Equation question not working was created by ployrich
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.27.14
Own server or LimeSurvey hosting: own server
Survey theme/template: fruity (for baseline testing)
==================
I wanted to do some value assignment tests today and was stumped because suddenly the expression manager seems not to work within equation question anymore.
I have attached a minimal example and a screenshot of the error in the console.
(tried it in firefox and chrome)
Thank you.
P.S in the screenshot the secon question is the equation which should set the third question to 10 if 1 is chosen in the first question. I realize that i should have taken a screenshot that, but I assure you I am not faking this problem.
Your LimeSurvey version: 3.27.14
Own server or LimeSurvey hosting: own server
Survey theme/template: fruity (for baseline testing)
==================
I wanted to do some value assignment tests today and was stumped because suddenly the expression manager seems not to work within equation question anymore.
I have attached a minimal example and a screenshot of the error in the console.
(tried it in firefox and chrome)
Thank you.
P.S in the screenshot the secon question is the equation which should set the third question to 10 if 1 is chosen in the first question. I realize that i should have taken a screenshot that, but I assure you I am not faking this problem.
Last edit: 1 year 2 months ago by ployrich.
Please Log in to join the conversation.
1 year 2 months ago #225944
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Equation question not working
You equation and your question that will receive the "assigned value" need to be on a different page and the equation needs to come after the question you want to assign the value to. Tested and it works.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: ployrich
Please Log in to join the conversation.
1 year 2 months ago #225946
by ployrich
Replied by ployrich on topic Equation question not working
I could have sworn i tried all those iterations. Thank you for pushing me into my own error.
Please Log in to join the conversation.
- DenisChenu
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 13145
- Thank you received: 2422
1 year 2 months ago #225947
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 Equation question not working
But this javascript broken must not happen : i think you can report the issue.
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.
Please Log in to join the conversation.
1 year 2 months ago #225948
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Equation question not working
It wasn't happening to me when I first tested the LSS ployrich had sent.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
1 year 2 months ago #225950
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 Equation question not working
I agree with Denis, there should not be a JavaScript error. Please file a bug report -
bugs.limesurvey.org
.
Additionally, your equation is wrong. If you are trying to set "h1", this:
Should be this:
Additionally, your equation is wrong. If you are trying to set "h1", this:
Code:
{if(setting == 1, h1 = 10, h1 = -90)}
Should be this:
Code:
{h1 = if(setting == 1, 10, -90)}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: ployrich
Please Log in to join the conversation.
1 year 2 months ago #225956
by holch
Yeah, this makes more sense and might not require to have the question and the equation on another page. But his/her equation works as well.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Equation question not working
Code:
{h1 = if(setting == 1, 10, -90)}
Yeah, this makes more sense and might not require to have the question and the equation on another page. But his/her equation works as well.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
1 year 2 months ago #225964
by ployrich
Replied by ployrich on topic Equation question not working
bug reported:
bugs.limesurvey.org/view.php?id=17936
Thanks for all the help! Bookmarking this thread so I won't forget my oversight and the right syntax again.
P.S. I just found own notes with the right syntax...so I already was aware in a different life apparently.
Thanks for all the help! Bookmarking this thread so I won't forget my oversight and the right syntax again.
P.S. I just found own notes with the right syntax...so I already was aware in a different life apparently.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.