Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Counting array answers

Counting array answers 3 years 8 months ago #92700

  • nuin
  • nuin's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 11
  • Karma: 0

We have a question where we have an array matrix with 15 subquestions and 12 options (one for each month of the year). We want to have the user to enter an X for at least one month in each one of the subquestions. I tried adding a count validation rule to the whole question, but it does not seem to be working as in our tests you cal leave a whole row empty and the answer is accepted (from a test version of our question)

count(spaq_12_12A_12Jan, spaq_12_12A_12Feb) >= 1 &&
count(spaq_12_12B_12Jan, spaq_12_12B_12Feb) >= 1 &&
count(spaq_12_12C_12Jan, spaq_12_12C_12Feb) >= 1 &&
count(spaq_12_12D_12Jan, spaq_12_12D_12Feb) >= 1

where spaq_12 is the question name 12A, etc is the subquestion ID and 12Jan, etc is the column ID.

Any help appreciated
The administrator has disabled public write access.
Time to create page: 0.166 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form