Welcome to the LimeSurvey Community Forum

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

Equation Issue

  • ccapra
  • ccapra's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #120264 by ccapra
Equation Issue was created by ccapra
I want to get a total of subquestion values in an array question.

I used the following:

{(A1_sq1.value+A1_sq2.value+A1_sq3.value+A1_sq4.value+A1_sq5.value+A1_sq6.value+A1_sq7.value+A1_sq8.value+A1_sq9.value+A1_sq10.value+A1_sq11.value)}

If I click the radio buttons in order, I get the correct total. But if I check on them out of order, I get each response listed in sequence.

So clicking in order I might get '18', whereas, if I did the whole set backwards, I'd have

12221222112

Is this a bug, or am I writing the equation wrong?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #120269 by tpartner
Replied by tpartner on topic Equation Issue
Try this:
Code:
{sum(A1_sq1.value, A1_sq2.value, A1_sq3.value, A1_sq4.value, A1_sq5.value, A1_sq6.value, A1_sq7.value, A1_sq8.value, A1_sq9.value, A1_sq10.value, A1_sq11.value)}

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: ccapra
The topic has been locked.
  • ccapra
  • ccapra's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #120270 by ccapra
Replied by ccapra on topic Equation Issue
That did it! Thanks!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose