Filtering child Case list using Parent property

Hello I am trying to filter a case list in my child case modules using a
property that is saved to the parent case.
The structure of my application is attached in the excel spreadsheet
(problematic filters are highlighted in red).

I believe the reason I am having problems is because the property I am using*
'combine_el'* is not saved when the child case is created. It is saved to
the parent 'household' in a followup module. I have tried to load the
property into the forms with case type 'household'member' but this does
not seem to work.

Is there another way?

Cheers,
Jess

App Structure.xlsx (27 KB)

Hi Jessica,

I might be missing something but you should be able to save that property
to the child case when its created. Alternatively, you can access
properties of the parent case knowing the child case. Both methods are
described here
https://confluence.dimagi.com/display/commcarepublic/Child+Cases.

Cheers,
Will

··· On Fri, Mar 3, 2017 at 5:44 AM, wrote:

Hello I am trying to filter a case list in my child case modules using a
property that is saved to the parent case.
The structure of my application is attached in the excel spreadsheet
(problematic filters are highlighted in red).

I believe the reason I am having problems is because the property I am
using* 'combine_el'* is not saved when the child case is created. It is
saved to the parent 'household' in a followup module. I have tried to load
the property into the forms with case type 'household'member' but this
does not seem to work.

Is there another way?

Cheers,
Jess

--
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.

Hi Will

Thanks for that information. I have applied the filter below to my case
list. But that still does not seem to work.
The property combine_el is in a followup form for the parent case and
therefore is not saved to the child case when it is created.

(combine_age_months <'60') and (parent/combine_el ='1')

I am not sure what i'm missing.

Cheers,
Jess

··· On Sun, Mar 5, 2017 at 5:20 AM, William Pride wrote:

Hi Jessica,

I might be missing something but you should be able to save that property
to the child case when its created. Alternatively, you can access
properties of the parent case knowing the child case. Both methods are
described here
https://confluence.dimagi.com/display/commcarepublic/Child+Cases.

Cheers,
Will

On Fri, Mar 3, 2017 at 5:44 AM, jessica@agimpact.org wrote:

Hello I am trying to filter a case list in my child case modules using a
property that is saved to the parent case.
The structure of my application is attached in the excel spreadsheet
(problematic filters are highlighted in red).

I believe the reason I am having problems is because the property I am
using* 'combine_el'* is not saved when the child case is created. It is
saved to the parent 'household' in a followup module. I have tried to load
the property into the forms with case type 'household'member' but this
does not seem to work.

Is there another way?

Cheers,
Jess

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/commcare-users/53UcIeYEvaM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Jessica Hall
CommCare Support Officer
PHONE + 61 421 823 711 SKYPE jhal2920

AgImpact http://agimpact.org/ - Creating positive change through
agriculture

Hi Jess,

Hard for me to know what might be the issue without looking at your
specific code. I'd usually try displaying that (or other) parent values in
the case list to debug. You should be able to select these from the "Add
Property" drop down and then copy the syntax from there. If that doesn't
work then you can report a bug from your domain and we can take a closer
look.

Cheers,
Will

··· On Sun, Mar 5, 2017 at 3:07 AM, Jessica Hall wrote:

Hi Will

Thanks for that information. I have applied the filter below to my case
list. But that still does not seem to work.
The property combine_el is in a followup form for the parent case and
therefore is not saved to the child case when it is created.

(combine_age_months <'60') and (parent/combine_el ='1')

I am not sure what i'm missing.

Cheers,
Jess

On Sun, Mar 5, 2017 at 5:20 AM, William Pride wpride@dimagi.com wrote:

Hi Jessica,

I might be missing something but you should be able to save that property
to the child case when its created. Alternatively, you can access
properties of the parent case knowing the child case. Both methods are
described here
https://confluence.dimagi.com/display/commcarepublic/Child+Cases.

Cheers,
Will

On Fri, Mar 3, 2017 at 5:44 AM, jessica@agimpact.org wrote:

Hello I am trying to filter a case list in my child case modules using a
property that is saved to the parent case.
The structure of my application is attached in the excel spreadsheet
(problematic filters are highlighted in red).

I believe the reason I am having problems is because the property I am
using* 'combine_el'* is not saved when the child case is created. It is
saved to the parent 'household' in a followup module. I have tried to load
the property into the forms with case type 'household'member' but this
does not seem to work.

Is there another way?

Cheers,
Jess

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/commcare-users/53UcIeYEvaM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Jessica Hall
CommCare Support Officer
PHONE + 61 421 823 711 SKYPE jhal2920

AgImpact http://agimpact.org/ - Creating positive change through
agriculture

--
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.

Hi Jess - my apologies, it appears that you've actually come across a bug
in HQ where parent references in filter expressions aren't being
transformed as they are in display properties.

I've submitted a ticket to address that issue. In the meantime you can work
around this by hard-coding in the full path to the parent case property, IE:

instance('casedb')/casedb/case[@case_id=current()/index/parent]/combine_el =
'1'

Cheers,
Will

··· On Sun, Mar 5, 2017 at 4:34 PM, William Pride wrote:

Hi Jess,

Hard for me to know what might be the issue without looking at your
specific code. I'd usually try displaying that (or other) parent values in
the case list to debug. You should be able to select these from the "Add
Property" drop down and then copy the syntax from there. If that doesn't
work then you can report a bug from your domain and we can take a closer
look.

Cheers,
Will

On Sun, Mar 5, 2017 at 3:07 AM, Jessica Hall jessica@agimpact.org wrote:

Hi Will

Thanks for that information. I have applied the filter below to my case
list. But that still does not seem to work.
The property combine_el is in a followup form for the parent case and
therefore is not saved to the child case when it is created.

(combine_age_months <'60') and (parent/combine_el ='1')

I am not sure what i'm missing.

Cheers,
Jess

On Sun, Mar 5, 2017 at 5:20 AM, William Pride wpride@dimagi.com wrote:

Hi Jessica,

I might be missing something but you should be able to save that
property to the child case when its created. Alternatively, you can access
properties of the parent case knowing the child case. Both methods are
described here
https://confluence.dimagi.com/display/commcarepublic/Child+Cases.

Cheers,
Will

On Fri, Mar 3, 2017 at 5:44 AM, jessica@agimpact.org wrote:

Hello I am trying to filter a case list in my child case modules using
a property that is saved to the parent case.
The structure of my application is attached in the excel spreadsheet
(problematic filters are highlighted in red).

I believe the reason I am having problems is because the property I am
using* 'combine_el'* is not saved when the child case is created. It
is saved to the parent 'household' in a followup module. I have tried to
load the property into the forms with case type 'household'member' but
this does not seem to work.

Is there another way?

Cheers,
Jess

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/commcare-users/53UcIeYEvaM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Jessica Hall
CommCare Support Officer
PHONE + 61 421 823 711 SKYPE jhal2920

AgImpact http://agimpact.org/ - Creating positive change through
agriculture

--
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.

Hi @William_Pride,
I am facing a similar challenge, has this been fixed?

Thanks,
Chaiwa.