Welcome to the LimeSurvey Community Forum

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

check if a list of questions in the group are answered

  • tassoman
  • tassoman's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 5 days ago #215198 by tassoman
Hello there, I'm trying to check if the participant has answered some questions in the group. Questions have sub-questions. Writing
Code:
{count(that.QFin1.NAOK)>0}
is just triggered when any subquestion gets an answer.
I need to check all the answers are collected, in a list of questions. So I wrote
Code:
{countif(4,that.QFin1.NAOK,that.QFin2.NAOK,that.QFin3.NAOK, that.QFin4.NAOK)>0}
but is always returning 0.
Maybe because the survey isn't activated yet, and isn't collecting answers?

«All your survey answers are belong to us »
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 days ago - 3 years 5 days ago #215200 by tpartner
Code:
{count(that.QFin1.NAOK) == 4}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 5 days ago by tpartner.
The following user(s) said Thank You: DenisChenu, tassoman
The topic has been locked.
  • tassoman
  • tassoman's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 days ago #215308 by tassoman
Thank you Tony for the advice, I wrote something like this:
Code:
{if(count(that.QFin1.NAOK) == 2 && count(that.QFin2.NAOK) == 2, 'OK','NO')}

And works flawless! Easy!

«All your survey answers are belong to us »
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose