Lookup table of child cases, filtered by child case property

Hi there,

I have an issue that I'd really appreciate your help with.

I have a survey that will interview households about their farming plots. In a household-level form I'd like to cycle through a repeat group of the child cases (called 'id_plot'). There will be two repeat groups, to ask similar questions about the 'main' growing season and the 'second' (off) season. The plot cases have case properties the relate to whether or not they are a main and/or second season plot.

I already have implemented the repeat group and lookup table of all the plots in the form. I am not sure how to implement the filter based on the childcase property (it should be: E10_main_binary=1)

At the moment the filter on the lookup table is as follows:

@case_type = 'id_plot' and index/parent = instance('commcaresession')/session/data/case_id

Assistance would be greatly appreciated!


Solved. Thanks ChatGPT!

Solution is

and E10_main_binary = 1

(i was stuck on what expression was needed to refer to the relevant case property 'E10_main_binary')

Full filter expression is

index/parent = instance('commcaresession')/session/data/case_id and @case_type = 'id_plot' and E10_main_binary = 1