Welcome to the LimeSurvey Community Forum

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

Limit answers in a dual Array

  • danzone
  • danzone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177520 by danzone
Limit answers in a dual Array was created by danzone
Dear all, I'm setting up a survey and I need to setup a dual array question (with just an answer for each column), with a contraint: limiting the number of answers to three.
Would I use a simple array, no problem: I could use a validation equation as follow:
Code:
countifop("==", "A1", OpzioniStrategiche_SQ001, OpzioniStrategiche_SQ002, OpzioniStrategiche_SQ003, OpzioniStrategiche_SQ004, OpzioniStrategiche_SQ005, OpzioniStrategiche_SQ006, OpzioniStrategiche_SQ007, OpzioniStrategiche_SQ008, OpzioniStrategiche_SQ009) <= 3 &amp;&amp; countifop("==", "A2", OpzioniStrategiche_SQ001, OpzioniStrategiche_SQ002, OpzioniStrategiche_SQ003, OpzioniStrategiche_SQ004, OpzioniStrategiche_SQ005, OpzioniStrategiche_SQ006, OpzioniStrategiche_SQ007, OpzioniStrategiche_SQ008, OpzioniStrategiche_SQ009)) <= 3

But the dual array seems not to have the possibility to specify a validation equation, so maybe the only possible solution is to write some Javascript code.

The kind of question I need to implement is drafted in the attachment.

Should I select another solution/question type?

This browser does not support PDFs. Please download the PDF to view it: Download PDF

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #177525 by tpartner
Replied by tpartner on topic Limit answers in a dual Array

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 4 months ago by tpartner.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177527 by DenisChenu
Replied by DenisChenu on topic Limit answers in a dual Array
There are already a feture request : bugs.limesurvey.org/view.php?id=13289 ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • danzone
  • danzone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177541 by danzone
Replied by danzone on topic Limit answers in a dual Array
OK, I started to monitor it
The topic has been locked.
  • danzone
  • danzone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177542 by danzone
Replied by danzone on topic Limit answers in a dual Array
Well actually my needs are to have two columns, and possible answers in each column shouldn't be no more than three. It is a "forecast" question: "what do you expect in the next 5 years" and "what do you expect in the next 10 years". I have to admit that I am a Limesurvey newbie :) Attached a new layout for my question (I realized that the one I posted yesterday doesn't represent my needs correctly).

But maybe I found the way: an Array Number with the checkbox option. I'm going to try this, and I will be back to report whether I succeded or not.

This browser does not support PDFs. Please download the PDF to view it: Download PDF

The topic has been locked.
  • danzone
  • danzone's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177567 by danzone
Replied by danzone on topic Limit answers in a dual Array
OK, solved it. Array Numbers, with the checkbox option did the job. Attached you can find my solution, in case it would be useful for others.

The validation equation, at sub-question level, is:
Code:
countifop("==", "1", OpzStrategInnovaz_SQY001_SQX001, OpzStrategInnovaz_SQY002_SQX001, OpzStrategInnovaz_SQY003_SQX001,  OpzStrategInnovaz_SQY004_SQX001,  OpzStrategInnovaz_SQY005_SQX001,  OpzStrategInnovaz_SQY006_SQX001,  OpzStrategInnovaz_SQY007_SQX001,  OpzStrategInnovaz_SQY008_SQX001, OpzStrategInnovaz_SQY009_SQX001) <= 3 &amp;&amp; countifop("==", "1", OpzStrategInnovaz_SQY001_SQX002,  OpzStrategInnovaz_SQY002_SQX002, OpzStrategInnovaz_SQY003_SQX002, OpzStrategInnovaz_SQY004_SQX002,  OpzStrategInnovaz_SQY005_SQX002,  OpzStrategInnovaz_SQY006_SQX002, OpzStrategInnovaz_SQY007_SQX002, OpzStrategInnovaz_SQY008_SQX002,  OpzStrategInnovaz_SQY009_SQX002) <= 3
 


File Attachment:

File Name: limesurvey..._349.zip
File Size:1 KB
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose