Has anyone ever tried having a form on a parent case sum all the values from its child cases in a specific property?
let’s say we’re collecting something like “How much money do you need for transportation?” in a property called “individual_transport_cost” and we were asking that question to a group of people who have cases that have the same parent. let’s say for the sake of argument that that parent case is the head of their household or community and that everyone’s case type is “respondent”.
suppose i had a followup form on the parent case, and inside that form, i wanted to have a calculation that showed me the sum of the transportation costs of his household members considering that they all have cases of their own, and i am currently updating the parent case.
i’m sure i’m just missing some syntax to call the casedb with a sum function or something like that. it’s much easier to just have a repeat and use a path to repeat in that function. but i’m more specifically interested in doing that when the objects i’m dealing with are either cases in casedb, or items in a lookup table.
what i’m really trying to do is to actually pull pieces of information from a case/lookup table that was selected in an advanced multiple select question that shows cases/lookup table entries.
any ideas will be appreciated