- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Array filter exclusion and question validation
- bciMDW
- Topic Author
- Offline
- New Member
Less
More
3 years 10 months ago #200254
by bciMDW
Array filter exclusion and question validation was created 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)
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)
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
3 years 10 months ago #200258
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 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
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
3 years 10 months ago #200289
by bciMDW
Replied by bciMDW on topic Array filter exclusion and question validation
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.
Thank you for the suggestion, saved me from wasting many more hours than I already have.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13637
- Thank you received: 2491
3 years 10 months ago #200316
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 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
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.