Welcome to the LimeSurvey Community Forum

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

Multiple choice with min/max answers and exclusive option

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 3 weeks ago #264298 by blocka
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.6.64 (240516)
Own server or LimeSurvey hosting: own
Survey theme/template: all
==================
I have a mandatory multiple choice question that requires the participant to choose 2 or 3 answers. But I also have an answer "None of the above", which is set to be an Exclusive option... However, since the question requires 2 or 3 answers, and the None negates the ability to provide more than 1 answer, I cannot advance to the next question because of the requirement to provide 2 to 3 answers.

Is there a workaround for this?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264305 by Joffm
Hi,
I should say:
A question validation like (Q01_9 = exclusive option)
Q01_9=="Y" or count(self)==2 or count(self)==3

and an tip like
{if(count(self)!=2 and count(self)!=3 and Q01_9!="Y","Please, select 2 or 3 options","")}

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 3 weeks ago #264306 by blocka
Thanks muchly for the suggestion. I tried adding the validation equation, but I still cannot select "None" (Q18_SQ005).
I've attached the survey in the event you might have time to take a peak...

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264308 by holch
Let me get this straight:

You can have either none of the options, or need to have 2 or 3.

So just one is not an option? Sounds quite odd to me somehow. Can't imagine where this might make sense.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264309 by Joffm
Use .NAOK

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 3 weeks ago #264471 by blocka
I've tried that, but alas, seems to make no difference. I figure a screen movie might help, so if you have 90 seconds, this explains what I'm trying to accomplish (and provides a review of how I have my validation equation set up):

1drv.ms/v/s!ApZ2h3V5HB1io_91YXC0-7HnU7mfUQ?e=VUVWB2

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264477 by holch
Just tested it and I confirm. And to be honest, I don't have a solution (yet). However, what I noticed:

Look at your video. When you check 2 or 3 answers, the text disappears and the little (!) turns blue.

But if you mark the exclusive option, the text disappears, but the symbol is still red.

Actually, thinking about it, you shouldn't use any equation in the message field. The message only appears if they conditions are not met. So you can just put the text, without having to taylor it, I think. So at the moment, there is something wrong with your Question validation equation, but the text disappears, because you have an equation in your Question validation tip. So the text disappears, but the warning is still there.

That is where we have to start from.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264478 by holch
I deleted the check for 2 or 3 items checked and left only the exclusive check. I this case, if you check the exclusive option you can also continue. So there must be some error with the OR.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264479 by holch
Code:
Q18_SQ005 == "Y"
--> Works fine.
Code:
count(self) ==2
--> Works fine.
Code:
Q18_SQ005 == "Y" OR count(self) ==2
--> Problem

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
1 year 3 weeks ago #264485 by blocka
So I tried what you suggested, but (and maybe I misunderstood what I had to do), now it appears the only way to submit the question is to choose SQ005 (None...).

See: 1drv.ms/v/s!ApZ2h3V5HB1io_94RxSAcAipRnNE2Q?e=hB59EU

Maybe if it you have it working correctly, could you share back the survey so I can see what I've done wrong?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 weeks ago #264511 by Joffm
Hi, I do not see any issue with (as I wrote "You have to use NAOK")
1. validation equation
Q18_SQ005.NAOK == "Y" or count(self.NAOK) == 2 or count(self.NAOK) == 3

2. validation tip
{if(count(self.NAOK) !=2 and count(self.NAOK) !=3 and Q18_SQ005.NAOK !="Y","Please, select 2 or 3 options","")}
Of course you can improve it.





 

File Attachment:

File Name: limesurvey...53_J.lss
File Size:47 KB


And you should change the "max.value" in Q18A to "count(that.Q18)"

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose