Count selected options in several questions to validate the last question

More
1 week 1 day ago #184554 by fishfree
3 multiple choice questions are in the same group, question codes are : youths(4 options), leaders(3 options), others(7 options), I want to validate if the count of selected options in the 3 questions greater than or equal to 5. So in the last question, i.e. others, I fill in the "Question validation equation" as below:
(1) and (count(youth_SQ001.NAOK, youth_SQ002.NAOK, youth_SQ003.NAOK, youth_SQ004.NAOK, leaders_SQ001.NAOK, leaders_SQ002.NAOK, leaders_SQ003.NAOK, others_SQ001.NAOK, others_SQ002.NAOK, others_SQ003.NAOK, others_SQ004.NAOK, others_SQ005.NAOK, others_SQ006.NAOK, others_SQ007.NAOK) <= (5))

But it didn't work. No validation triggered against my custom logic.

Please Identificarse or Create an account to join the conversation.

LimeSurvey Partners
More
1 week 1 day ago #184559 by jelo
You should state what version of LimeSurvey you use and provide an lss-export of just these questions you want to discuss.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu

Please Identificarse or Create an account to join the conversation.

More
1 week 1 day ago #184568 by Joffm
There is nearly the same question in the German part.

(1) and (count(youth_SQ001.NAOK, youth_SQ002.NAOK, youth_SQ003.NAOK, youth_SQ004.NAOK, leaders_SQ001.NAOK, leaders_SQ002.NAOK, leaders_SQ003.NAOK, others_SQ001.NAOK, others_SQ002.NAOK, others_SQ003.NAOK, others_SQ004.NAOK, others_SQ005.NAOK, others_SQ006.NAOK, others_SQ007.NAOK) <= (5))
This looks a bit strange. Did you enter exactly this?
Seems to be something of the logic file, but not everything.


sum(count(that.youth),count(that.leaders),count(that.others))<6
works (from 2.06 - 3.17.3)

Example with max. 4 answers:

Joffm


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

Please Identificarse or Create an account to join the conversation.

More
1 week 1 day ago #184595 by fishfree
Thank you for perfectly solving my problem! I mistook exactly inputting that expression according the logic file containing minimum validation in other fields.

Please Identificarse or Create an account to join the conversation.

More
1 week 1 day ago #184598 by fishfree
Sorry, I find it not working as expected. In which question do you input the validation expression?

Please Identificarse or Create an account to join the conversation.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión