I'm creating a poll for the radio.

More
1 month 2 weeks ago #203911 by AdamPolaco
Hello

I'm creating a poll for the radio.
The survey consists of 6 questions, in each question there are 6 answers (a, b, c, d, e, f)
I have to create such a condition that when I give at least 3 answers to "a" it turns out that, for example, you like rock, at least 3 answers to "b" you like disco, etc.

Thank you and best regards

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 2 weeks ago - 1 month 2 weeks ago #203913 by Joffm
Hi,
here
https://manual.limesurvey.org/ExpressionScript_-_Presentation#Implemented_functions
you find the function "countif"
This gives you the number of answers to each item a,b,c,...
With a nested "IF-statement" decide what he likes
{if(countif("a",Q1.NAOK,Q2.NAOK,...)>2,"rock",if(countif("b",Q1.NAOK,Q2.NAOK,...)>2,"disco",if(...

What happens if there is a 3:3 distribution like "a,a,b,a,b,b"?

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 2 weeks ago by Joffm.

Please Log in to join the conversation.

More
1 month 2 weeks ago #203915 by AdamPolaco
what type i should to use

Please Log in to join the conversation.

More
1 month 2 weeks ago #203916 by Joffm
Since you didn't mention how and where you want to use the result, I just showed the function.

If you want to only show the result, in a question "text display".
Or in the question text of another question, like
"You said, you love {if (countif (.....}.
How do you rate .... "

Or, if you want to save the result, use an equation.

Up to you.
Best, you read again the manual
https://manual.limesurvey.org/ExpressionScript_Engine_-_Quick_start_guide

and study the sample survey
https://manual.limesurvey.org/ExpressionScript_sample_surveys#Relevance.2C_Tailoring_and_Equations


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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now