Hello,
I’m working on the Essential Health Survey and would appreciate your help resolving an issue I’ve encountered.
Structure Overview:
- I have a Household Roster where all household members are listed.
- In the Women’s Section, I display only eligible women (based on age criteria).
- Inside the Women’s Section, I created a child roster to list all children under 5 years old who are cared for by the currently selected woman.
How I set it up:
- In the Household Roster, for each child under 5, I ask who their caregiver is, using a variable called caregiver_id. This is a person selector, limited to selecting members from the household roster.
- In the Women’s Section (in its child roster), I want to list only those children whose caregiver_id matches the currently selected woman.
What I tried:
I used this enabling condition inside the child roster (under the woman roster):
hhmember_r.Any(x => x.caregiver_id == @rowcode)
But this only shows the currently selected woman (or sometimes none), not the children for whom she is the caregiver.
I also tried:
@rowcode == caregiver_id
…but this didn’t work either.
What I want:
For each woman in the roster, I want to display only the children under 5 whose caregiver_id matches her person ID (@rowcode). In other words, I want to show children where this woman is listed as their caregiver.
Could someone help me figure out the correct enabling condition to achieve this?
Thank you!