Filtering cases when using cases as multiple choice options

I created a form with a multiple select question with cases as options. On
this
https://confluence.dimagi.com/display/commcarepublic/Multiple+Choice+Questions+with+Cases+as+Choices
help page, it says that you can restrict the cases shown to be only open
cases by appending a [@status='open'] clause. I would like to further
filter this list based on a case property (Status = 'Enrolled'). I tried
appending this in the same way but got an error message saying it could not
find that path. Here's the section of the XML code:

Is there a way to do this?

Thanks!

Hi Eric,

For normal case property you should remove the @ sign. So it should be
ce('casedb')/casedb/case[@case_type='ANC'][@status = 'open'][Status =
'Enrolled']

··· On Thu, Jan 12, 2017 at 4:21 PM, Eric Jospe wrote:

I created a form with a multiple select question with cases as options. On
this
https://confluence.dimagi.com/display/commcarepublic/Multiple+Choice+Questions+with+Cases+as+Choices
help page, it says that you can restrict the cases shown to be only open
cases by appending a [@status='open'] clause. I would like to further
filter this list based on a case property (Status = 'Enrolled'). I tried
appending this in the same way but got an error message saying it could not
find that path. Here's the section of the XML code:

Is there a way to do this?

Thanks!

--
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, Cory! That works.

-Eric

··· On Thu, Jan 12, 2017 at 1:06 PM, Cory Zue wrote:

Hi Eric,

For normal case property you should remove the @ sign. So it should be
ce('casedb')/casedb/case[@case_type='ANC'][@status = 'open'][Status =
'Enrolled']

On Thu, Jan 12, 2017 at 4:21 PM, Eric Jospe eric.jospe@gmail.com wrote:

I created a form with a multiple select question with cases as options.
On this
https://confluence.dimagi.com/display/commcarepublic/Multiple+Choice+Questions+with+Cases+as+Choices
help page, it says that you can restrict the cases shown to be only open
cases by appending a [@status='open'] clause. I would like to further
filter this list based on a case property (Status = 'Enrolled'). I tried
appending this in the same way but got an error message saying it could not
find that path. Here's the section of the XML code:

Is there a way to do this?

Thanks!

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

Hey Cory, quick follow-up question. Rather than having all open cases for
each owner group displayed, I'd like only the cases of a particular
location (cell) to appear, depending on where the training is taking place
on any given day. There's a cell lookup table, and cells are also case
properties assigned to each case. However, when I tried adding the cell
lookup table and filtering the cases based on that, no cases showed up in
the form. Is it possible to do this another way?

Thanks!

-Eric

··· On Thu, Jan 12, 2017 at 2:07 PM, Eric Jospe wrote:

Thanks, Cory! That works.

-Eric

On Thu, Jan 12, 2017 at 1:06 PM, Cory Zue czue@dimagi.com wrote:

Hi Eric,

For normal case property you should remove the @ sign. So it should be
ce('casedb')/casedb/case[@case_type='ANC'][@status = 'open'][Status =
'Enrolled']

On Thu, Jan 12, 2017 at 4:21 PM, Eric Jospe eric.jospe@gmail.com wrote:

I created a form with a multiple select question with cases as options.
On this
https://confluence.dimagi.com/display/commcarepublic/Multiple+Choice+Questions+with+Cases+as+Choices
help page, it says that you can restrict the cases shown to be only open
cases by appending a [@status='open'] clause. I would like to further
filter this list based on a case property (Status = 'Enrolled'). I tried
appending this in the same way but got an error message saying it could not
find that path. Here's the section of the XML code:

Is there a way to do this?

Thanks!

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