Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Validating an Array (Texts)

Validating an Array (Texts) 2 years 6 months ago #103025

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6114
  • Thank you received: 1356
  • Karma: 532
Can you attach a small sample survey?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Validating an Array (Texts) 2 years 6 months ago #103068

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
A working example is attached.

File Attachment:

File Name: limesurvey...1239.lss
File Size:25 KB


In this case, you use:
sum(self.sq_A.NAOK)

The reason this works is that sum(x,y,z) will only sum the visible values if you use the .NAOK suffix on each of x, y, and z (which is what self.sq_A.NAOK does). Without the .NAOK suffix, the sum will always be zero if any rows are invisible.

Here is a screen-shot:

Last Edit: 2 years 6 months ago by TMSWhite.
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu, Dede1989
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.251 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form