Welcome to the LimeSurvey Community Forum

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

Array (numbers) - maximum multiple answers

  • bogika0107
  • bogika0107's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #158187 by bogika0107
Array (numbers) - maximum multiple answers was created by bogika0107
Hello everyone!

Can i do a matrix, where i can maximize the answers number in this question type --> array (numbers).

I want to a table where I can use checkbox and the maximum answers number is 2(or 3 etc) in every column.

Thx for your help!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago #158200 by Joffm
Replied by Joffm on topic Array (numbers) - maximum multiple answers
Hello, Bogika0107,
please read:
manual.limesurvey.org/Expression_Manager....27that.27_variables

You find:

What is the total of row B? {sum(self.sq_B.NAOK)}


In your case you want to know the count of the row.

What is the count of row B? {count(self.sq_B.NAOK)}

This way you can set a validation on the rows.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: bogika0107
The topic has been locked.
  • bogika0107
  • bogika0107's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #158209 by bogika0107
Replied by bogika0107 on topic Array (numbers) - maximum multiple answers
Dear Joffm!
Thank you for your help. I read the manual and the Expression Manager, but i couldn't fix my problem.
I have been attached a picture. It look like my question now. But i want limit the answers every column (not rows). If i set the maximum number of responses to two -in the other settings-, you can only give two answers in total. But i want you can select the 2 most importat things in every age groups.
The topic has been locked.
  • bogika0107
  • bogika0107's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #158217 by bogika0107
Replied by bogika0107 on topic Array (numbers) - maximum multiple answers
OK, I found a solution! Thx :)
"(sum(self.sq_X1) <= 3) && (sum(self.sq_X2) <= 3) && (sum(self.sq_X3) <= 3) && (sum(self.sq_X4) <= 3) && (sum(self.sq_X5) <= 3)"
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose