Filtering by case properties when using cases as multiple choice options

Hi all,

I didn't get a response on my last question so I'm trying again. I'd like
to use cases as options for a checkbox question, and I followed the
instructions on the help site to edit the XML and create the form. However,
rather than all open cases displaying, I would like the form to filter
cases by location (cell), which is a case property assigned to each case. I
have a lookup table that allows the user to specify which cell he/she is in
on any given day, but I'm not sure how to link the selection of the cell in
the lookup table to filter the list of cases.

Thanks for your help!

-Eric

Eric,

As an example let's assume that your cell question is named /data/cell and
the lookup table populating the options contains ["Boston", "Cape Town",
"Delhi", "Dakar"]. Then we'll also assume that your cases each have a case
property "cell" that is also going to be one of the options from the set
above. Finally we'll assume you have an itemset similar to the example from
the docs:




Then you would proceed by adding to the filter expressions (IE
[@case_type='your_type'][@status='open'])
another expression that filters based on the case cell and answer to the
cell question: [cell = /data/cell] so you'd end up with:

Note that we do not prepend the '@' character here because "cell" is a
property, not an attribute.

Cheers,
Will

ยทยทยท On Tue, Jan 17, 2017 at 11:35 AM, Eric Jospe wrote:

Hi all,

I didn't get a response on my last question so I'm trying again. I'd like
to use cases as options for a checkbox question, and I followed the
instructions on the help site to edit the XML and create the form. However,
rather than all open cases displaying, I would like the form to filter
cases by location (cell), which is a case property assigned to each case. I
have a lookup table that allows the user to specify which cell he/she is in
on any given day, but I'm not sure how to link the selection of the cell in
the lookup table to filter the list of cases.

Thanks for your help!

-Eric

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