- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Is it possible to pipe the result of an equation into the default answer?
- LimeHo
- Topic Author
- Offline
- New Member
Less
More
8 years 4 months ago #129368
by LimeHo
Is it possible to pipe the result of an equation into the default answer? was created by LimeHo
Hello,
I'm trying to get the results of an equation to be visible as the default answer for a single numerical input question type but it doesn't seem to be updating. From what I've read in the manual and the forums, it seems like it should be possible but I'm not able to get it to work. I'm using LS Version 2.5RC Build 151008.
Steps taken:
1. Survey has q1, q2, q3, total. Each are single numerical input question types
2. Survey also has a Equation question type: {sum(q1, q2, q3)} with question code: EqTotal
3. In total question, I put {EqTotal.shown} and it dynamically shows the value as I enter things into q1, q2, q3.
4. In total question, I put {EqTotal.shown} into the Default Answer but it only shows '0' regardless of what I put into q1, q2, q3
For #4, I've tried insertans:sidxgidxqid and other qID.{property} settings but it doesn't seem to work. From what I read there was a limitation of equation results only being available in subsequent pages but was updated to allow it after version 2.
Is it possible to pipe the result of an equation into the default answer?
Thanks in advance.
I'm trying to get the results of an equation to be visible as the default answer for a single numerical input question type but it doesn't seem to be updating. From what I've read in the manual and the forums, it seems like it should be possible but I'm not able to get it to work. I'm using LS Version 2.5RC Build 151008.
Steps taken:
1. Survey has q1, q2, q3, total. Each are single numerical input question types
2. Survey also has a Equation question type: {sum(q1, q2, q3)} with question code: EqTotal
3. In total question, I put {EqTotal.shown} and it dynamically shows the value as I enter things into q1, q2, q3.
4. In total question, I put {EqTotal.shown} into the Default Answer but it only shows '0' regardless of what I put into q1, q2, q3
For #4, I've tried insertans:sidxgidxqid and other qID.{property} settings but it doesn't seem to work. From what I read there was a limitation of equation results only being available in subsequent pages but was updated to allow it after version 2.
Is it possible to pipe the result of an equation into the default answer?
Thanks in advance.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 4 months ago #129371
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 Is it possible to pipe the result of an equation into the default answer?
The default answer isn't dynamic. It is only set once when the page first loads, so when that happens, q1, q2, q3 haven't been answered yet so it gets a value of 0.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- LimeHo
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
8 years 4 months ago #129376
by LimeHo
Replied by LimeHo on topic Is it possible to pipe the result of an equation into the default answer?
Thanks Tpartner! I suspected that as well but the examples that I saw made me believe that it was possible.
www.limesurvey-consulting.com/pre-fillin...xpression-manager-2/
www.limesurvey-consulting.com/pre-fillin...xpression-manager-2/
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
8 years 4 months ago #129379
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 Is it possible to pipe the result of an equation into the default answer?
Note that that page says "The question for which you set the default answer has to be shown on a following page.".
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.