Check if more than one multiple choice has been selected

Mehr
3 Jahre 5 Monate her #104435 von arna
arna erstellte das Thema Check if more than one multiple choice has been selected
Hello, I am new to Limesurvey - thanks for the fantastic software and good documentation. It is refreshing to use open-source which is so established and well maintained. I will definitely make a donation or contribute otherwise :)

One thing I am a bit stuck on and would appreciate help with:

I need to write an expression which checks whether more than one multiple choice has been chosen.

Is there a way of assigning the value 1 to subquestions so I could use something like: count(that.Qcode.value) > 1 ??

Thanks

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #104507 von tomscher
tomscher antwortete auf das Thema: Check if more than one multiple choice has been selected
Hi,
Not sure what kind of question you are using and what you want to do in the long run...
I assume it's the "Array Numbers (Checkbox Layout)" version with 5 columns and only one row.

You could try to fill this in a question afterwards:

{if(sum(Test_A_1, Test_A_2, Test_A_3, Test_A_4, Test_A_5) > 1, "More than one alternative was selected", "One or no alternative was selected")}

If you just want to validate the number of checked alternatives, then you can simply use the same idea (without the if-clause) in the validate answer field of the respective question.

Does that help?

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #104542 von tpartner
tpartner antwortete auf das Thema: Check if more than one multiple choice has been selected
You cannot assign assessment values to Multiple Choice subquestions. However given a Multiple Choice with question code "Q1" and sub-question codes "A1", "A2", "A3", "A3", you can use an equation like this:

{if(sum(Q1_A1 == "Y", Q1_A2 == "Y", Q1_A3 == "Y", Q1_A4 == "Y") > 1, 'More than one checked', '')}

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

Bitte Anmelden um der Konversation beizutretten.

Haben Sie schon bei unserer Kundenumfrage mitgemacht?

Verpassen Sie nicht Ihre Chance auf tolle Preise.

Klicken sie hier um teilzunehmen:

Jetzt starten

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten