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:
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:
···
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']
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:
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']
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: