Array (text)--submit this question when they fill in at least one row

More
1 month 3 weeks ago #215499 by LisaTW
Hi there,
I try to use array(text) question to ask school travel, there are 4 ways (On foot, by cycling, by public transportation, by car), participant can choose multiple. This is a mandatory question.
But participant needs to fill in all boxes before submit. Could this question change to like this: people could submit this question when they fill in at least one row (like the attached picture).
I'm using Version 3.25.21.

Thank you in advance.

Best,
Lisa
 
Attachments:

Please Log in to join the conversation.

More
1 month 3 weeks ago #215514 by tpartner
Question validation equation (given y-scale sub-question codes Y001, Y002...):

count(self.sq_Y001) == 2
OR
count(self.sq_Y002) == 2
OR
count(self.sq_Y003) == 2
OR
count(self.sq_Y004) == 2

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
1 month 3 weeks ago #215535 by LisaTW
Hi Tpartner,

Thank you for your quick reply!
I have tried to add question validation equation but my survey still didn't work. Could you help me check what is wrong in my sample survey?
I want to design this as: participant can choose fill in one row or multiple rows. But my survey still show warning: please complete all parts.

Thank you in advance!

Lisa
Attachments:

Please Log in to join the conversation.

More
1 month 3 weeks ago #215542 by holch
I didn't look into your survey, but my guess would be that you have to make the question "non mandatory" and use tpartners code instead to confirm that they filled in at least 1 cell.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
1 month 2 weeks ago #215579 by LisaTW
Hi holch,
Thank you for your suggestions! It works well now.
For the question about age, I may used wrong code. so the second question didn't work.
count(S001) == 1
OR
count(S002) == 1
OR
count(S003) == 1
OR
count(S004) == 1
OR
count(S005) == 1
OR
count(S006) == 1
OR
count(S007) == 1
OR
count(S008) == 1

Lisa

Please Log in to join the conversation.

More
1 month 2 weeks ago #215582 by tpartner
I suspect the variable names are incorrect. Please read the manual - manual.limesurvey.org/ExpressionScript_-...#Access_to_variables

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now