Limit answers in a dual Array

More
7 months 2 weeks ago #177520 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:
countifop("==", "A1", OpzioniStrategiche_SQ001, OpzioniStrategiche_SQ002, OpzioniStrategiche_SQ003, OpzioniStrategiche_SQ004, OpzioniStrategiche_SQ005, OpzioniStrategiche_SQ006, OpzioniStrategiche_SQ007, OpzioniStrategiche_SQ008, OpzioniStrategiche_SQ009) <= 3 && 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

Attachments:

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
7 months 2 weeks ago - 7 months 2 weeks ago #177525 by tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 7 months 2 weeks ago by tpartner.

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #177527 by DenisChenu
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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #177541 by danzone
OK, I started to monitor it

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #177542 by danzone
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

Attachments:

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #177567 by danzone
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:
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 && 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
Attachments:
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!