Lookup table from members that i registered


(Hossam Alkhalili) #1

i created newly awareness sessions case list, we need to select members who attend this awareness session, those members are registered on other case list call Families, adding members happened by loop question inside “families case list”.
How can i use lookup table to see the members

https://confluence.dimagi.com/display/commcarepublic/Multiple+Choice+Questions+with+Cases+as+Choices

i used this link, but the household name appeared not the members what changes should i do to make members appear??

Thanks for support


(Mazen AlAli) #2

unless the family members repeat group is being used to create cases of a different type “Member” for example, you won’t be able to use this feature to get individual members to pick from.

in order to accomplish that, check out this page
https://confluence.dimagi.com/display/commcarepublic/Child+Cases

and then, when the child cases are created, you can change the query you had for families and change the case type to “members”. what will happen if you leave things like this though, is that you’ll get a list of all the members for all the families (likely huge). in order to make things easier, you might want to add a question that asks something like first letter of the first name, or to select the family before you select the member (another multi-select with cases but this type it’s families not members), and add a clause to the members query to filter by that question.

if you are planning on tracking the members themselves and what happens to them over time, your form structures would have to change, as you would have to select the member case before you can load the form so that you can update that specific case.


(Mazen AlAli) #3

A workaround that doesn’t require the cases to be created is found here

but, that might complicate things depending on what you’re trying to record against which case. for example, you cannot have an answer to a question inside a repeat group be the case attribute as CommCare will not know which instance of the repeat should be stored. but you can have a hidden value to do some calculations and store that against whichever case you’re working with