Filtering a list of cases by case property

Another one for me:

I'm trying to get a list of children (age under 18) registered to a
household in a multiple choice lookup table question using this filter:

instance('casedb')/casedb/case[@case_type = 'household_member'][@status =
'open'][properties/age_years < 18][index/parent =
instance('commcaresession')/session/data/case_id]

It doesn't work :frowning:

Does anyone know the correct syntax for querying a case list by property?

Cheers,
Amber.

Hi Amber,

Try removing the "properties" before age_years so you just have '[age_years
< 18]'

Cheers,
Will

··· On Wed, Sep 28, 2016 at 8:01 AM, wrote:

Another one for me:

I'm trying to get a list of children (age under 18) registered to a
household in a multiple choice lookup table question using this filter:

instance('casedb')/casedb/case[@case_type = 'household_member'][@status =
'open'][properties/age_years < 18][index/parent =
instance('commcaresession')/session/data/case_id]

It doesn't work :frowning:

Does anyone know the correct syntax for querying a case list by property?

Cheers,
Amber.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks again, William. I did try that initially but it wasn’t working (I
got that missing node error). I will triple check it to make sure I didn’t
make a silly mistake.