Welcome to the LimeSurvey Community Forum

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

condition with Sum function for three question

  • phamvanninh
  • phamvanninh's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 4 months ago #143565 by phamvanninh
Hello,
I have three question in a group.

Q1: Dropdown with 0, 3, 5, 10
Q2: Dropdown with 0,1,3,5
Q3: Dropdown with 0,1,2,3,4

and sum of Q1, Q2, Q3 < 10.

Can i setup question in Lime with three question alway show and system show Error when sum of Q1, Q2, Q3 more than 20,
Thanks you very much
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 4 months ago #143582 by tpartner
Replied by tpartner on topic condition with Sum function for three question
Unfortunately, there is no "Whole question validation equation" or "Tip for whole question validation equation" for single-choice drop-downs or radios.

A workaround may be to use 3 array type questions with a single sub-question each.

You could insert something like this as the "Whole question validation equation":
Code:
sum(Q1_SQ001, Q2_SQ001, Q3_SQ001) < 21

And, something like this for the "Tip for whole question validation equation":
Code:
{if(sum(Q1_SQ001, Q2_SQ001, Q3_SQ001) > 20, 'Must not total to more than 20.', '')}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose