Welcome to the LimeSurvey Community Forum

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

How can carry out dual-column multiple numerical input?

  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 3 weeks ago - 8 years 3 weeks ago #134167 by tpartner
Try this for the following requirements:

- Nothing is answered
OR
- Both columns total to 0
OR
- One column totals to 100

Code:
count(self) == 0 OR (sum(self.sq_curr)== 0 AND sum(self.sq_ago)== 0) OR (sum(self.sq_curr)== 100 OR sum(self.sq_ago)== 100)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 3 weeks ago by tpartner.
The following user(s) said Thank You: mrli999
The topic has been locked.
  • mrli999
  • mrli999's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
8 years 3 weeks ago #134168 by mrli999

tpartner wrote: Try this for the following requirements:

- Nothing is answered
OR
- Both columns total to 0
OR
- One column totals to 100

Code:
count(self) == 0 OR (sum(self.sq_curr)== 0 AND sum(self.sq_ago)== 0) OR (sum(self.sq_curr)== 100 OR sum(self.sq_ago)== 100)


perfect!!!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose