Is it possible to pipe the result of an equation into the default answer?

Plus d'informations
il y a 3 ans 6 mois #129368 par 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.

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 3 ans 6 mois #129371 par tpartner
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.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 ans 6 mois #129376 par LimeHo
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/

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 ans 6 mois #129379 par tpartner
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.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!