Filtering Case Details Data Tab Nodeset


#1

Hi!,

I have a case type “hh_members” that has a propery “mcg_group_caseid” from another case type mother_care_groups saved to it.
On the case details tab of the case list Mother Care Groups, I would like to filter a list of household members who have the mcg_group_caseid for the particular case.
Here is my instance path but doesn’t display any list
instance(‘casedb’)/casedb/case[@case_type=“hh_members”][mother_care_group_caseid=@case_id]


(Cody Stahl) #2

That expression isn’t displaying a list because it is actually returning a set of XML elements corresponding to the cases. In order to display information about these cases in the Case Detail, you will need to pull out a specific case property, and then join the multiple responses together with a string.

For example, if you wanted to display the case_names for each of the hh_members cases, and join them together in a comma-delimited list, you could do the following:

join(",",instance(‘casedb’)/casedb/case[@case_type=“hh_members”][mother_care_group_caseid=@case_id]/case_name)

Hope this helps!