- Posts: 22
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Counting number of Yes in array question
- Salini
- Topic Author
- Offline
- Junior Member
Less
More
3 years 6 months ago #206217
by Salini
Counting number of Yes in array question was created by Salini
Hello,
I have a survey where a question depend on the number of "Yes" in the previous array question. That is if I have 2 or more yes among the list of attributes, then we need to ask the next question.
Do you know how to this?
Thank a lot for your help.
Salini
I have a survey where a question depend on the number of "Yes" in the previous array question. That is if I have 2 or more yes among the list of attributes, then we need to ask the next question.
Do you know how to this?
Thank a lot for your help.
Salini
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13647
- Thank you received: 2491
3 years 6 months ago #206220
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Counting number of Yes in array question
The easiest to undertand solution , if your array question have ARRAY title and your subquestion have SQ01, SQ01, SQ023 title, adn, yopur code for Yes is Yes
Relevance equation to
Bit you can use countifop too
(you don't really need the > 0
See manual : manual.limesurvey.org/ExpressionScript_E..._-_Quick_start_guide
Best is to explain exactly all you want with current code …
Relevance equation to
Code:
count(ARRAY_SQ01.NAOK=="Yes",ARRAY_SQ02.NAOK=="Yes",ARRAY_SQ03.NAOK=="Yes",ARRAY_SQ04.NAOK=="Yes") >= 2
Bit you can use countifop too
Code:
countifop(">=",3,that.ARRAY.NAOK) > 0
See manual : manual.limesurvey.org/ExpressionScript_E..._-_Quick_start_guide
Best is to explain exactly all you want with current code …
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Salini
The topic has been locked.
- Salini
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 1
3 years 6 months ago #206222
by Salini
Replied by Salini on topic Counting number of Yes in array question
Dear DenisChenu,
Thank you for your reply.
Let me me try your solutions and check the manual link you sent.
Thanks again,
Salini
Thank you for your reply.
Let me me try your solutions and check the manual link you sent.
Thanks again,
Salini
The topic has been locked.
- Salini
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 1
3 years 6 months ago #206337
by Salini
Replied by Salini on topic Counting number of Yes in array question
Hello DenisChenu,
Thank you for your solution.
It's working perfectly with slight modifications to adapt to my survey.
Cheers,
Salini
Thank you for your solution.
It's working perfectly with slight modifications to adapt to my survey.
Cheers,
Salini
The following user(s) said Thank You: DenisChenu
The topic has been locked.