I have an attendance form that has a custom checkbox question showing all of the child cases (individual training participants). I want to filter this according to a previous custom checkbox question showing all of the parent cases (organizations the participants belong to).
The custom questions are working (ie all the parent and child names appear). However I can't figure out how to filter the child lookup table according to the parent case property ("name")
Things I have tried include:
Any tips would be very helpful!
Edit - I think the issue is that the form actually creates a third case type "event". So I am trying to apply the filter on the lookup tables of child case but don't know how to reference the child case database.
Checkbox question A: Selects a bunch of parent cases.
Checkbox question B: Selects a bunch of child cases to that parents selected above
what you are saying here is that you want checkbox question B to not only be filtered by the parent case ID's, but only those parents who have a property of a specific value?
if this is it, first question that comes to mind is: Why not filter the checkbox question A to only show parents that have that filter already applied?
if you have a good reason for it, then the next thing to consider is this:
generate a list of parent case ID's that fit the filter using a join with a space character.
then you can pass that in the filter argument for checkbox B that uses the "contains" function.
now, the tricky bit is that you want to make that list only contain the cases selected in checkbox A. not entirely sure how to go about that.