Validation condition in a nested roster with the levels

Dear Survey Solutions team,
I need your help to fix a problem I face.
I have a nested roster with 3 levels:
Level 1: Roster Parcel
Level 2: Roster Plot
Level 3 contain 3 rosters which source is link to the household members:

  • Roster Land preparation and planting (landprepare), contain the question Q1b (During the period, did %rostertitle% work on this [PLOT] for land preparation and/or planting?). This roster is activated by the question Q1a (Did you use household labour for Land preparation and planting?) located in the plots roster,

  • Roster Weeding (weeding), contain the question Q2b (During the period, did %rostertitle% work on this [PLOT] for Weeding?). This roster is activated by the question Q2a (Did you use household labour for Weeding?) located in the plots roster,

  • Roster Havesting (harvesting), contain the question Q3b (During the period, did %rostertitle% work on this [PLOT] for Havesting?). This roster is activated by the question Q3a (Did you use household labour for Havesting?) located in the plots roster.

I would like to add a validation condition in the question Q1b so that for each plot a error message will be display if all the household members respond by NO. The same condition will be done in the question Q2b, Q3b.
I tried the condition below but it’s not working

landprepare.All(x=>x.Q1b!=null)?

landprepare.Count(x=>x.Q1b==1)>0:

true

Please, could you help me to fix the problem?

Thanks a lot.
Regards

Hello, Sondo,

and thank you for the question.

I have created an example of this situation in “Public example User questions and common patterns”. See the “Check statuses”:https://designer.mysurvey.solutions/questionnaire/details/04b421596f0443e88cd99ec0538d89ff/chapter/9dfc302a2a8ed431d88e52a717994fc4/group/9dfc302a2a8ed431d88e52a717994fc4 section.
The parcels and plots don’t matter, since the check occurs within them. Also, you have three copies of the rosters by different type of activities, so will need to copy the example pattern 3 times.

Best, Sergiy Radyakin

1 Like

Dear Sergiy,
Many thanks for your very useful response.

Regards