Welcome to the LimeSurvey Community Forum

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

Array filter exclusion and question validation

  • bciMDW
  • bciMDW's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #200254 by bciMDW
Hello,

I have an Array (numbers) question that I use array filter exclusion to remove answers -This works fine

I also have a question validation equation - this also works fine.

However, when one or more subquestions are removed the question validation fails and I cannot finish the survey.

I am using version 3.22.17+200525

I have tried many ways to solve this but can't find an answer. Any help is appreciated

My question validation equation is fairly complex but is:
if(count(self.sq_sub1.NAOK), self.sq_sub1_min < self.sq_sub1_mean && self.sq_sub1_max > self.sq_sub1_mean,
1) &&
if(count(self.sq_sub2.NAOK), self.sq_sub2_min < self.sq_sub2_mean && self.sq_sub2_max > self.sq_sub2_mean,
1) &&
if(count(self.sq_sub3.NAOK), self.sq_sub3_min < self.sq_sub3_mean && self.sq_sub3_max > self.sq_sub3_mean,
1) &&
if(count(self.sq_sub1.NAOK), self.sq_sub1_conf>=50,1)&&
if(count(self.sq_sub2.NAOK), self.sq_sub2_conf>=50,1)&&
if(count(self.sq_sub3.NAOK), self.sq_sub3_conf>=50,1)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200258 by DenisChenu
Replied by DenisChenu on topic Array filter exclusion and question validation
Always add .NAOK to your question code

;)

Here : i think it's exactly the issue

manual.limesurvey.org/Expression_Manager#Usage_of_NAOK

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 topic has been locked.
  • bciMDW
  • bciMDW's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #200289 by bciMDW
I can confirm adding NAOK to all parts fixes the problem. Not sure why I didn't try that considering I put .NAOK in the first part...

Thank you for the suggestion, saved me from wasting many more hours than I already have.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200316 by DenisChenu
Replied by DenisChenu on topic Array filter exclusion and question validation
I add .NAOK even if i don't need it.

And in fact : i need to fix this issue Default suffix to NAOK not 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 topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose