Update case property (calculation) from two separate forms

Hi CommCare friends,

I have a question about updating a case property based on a calculation shared by two separate forms.

The scenario is that we are trying to evaluate individuals in two phases: one phase (and its corresponding form) will occur one day, and the 2nd (and its separate form) on a different day. Each form has hidden values to capture the “score” for each activity in each phase, as well as an aggregate total score for each.

We are trying to use a “final score” which is generated based on the results of the first form + the second score. Ideally, once the 2nd phase/form is completed, the CommCare app user would be able to know if the person/case “passed” or “failed” (whether by receiving an alert, seeing an updated property in a case list, etc)

Any thoughts on how to do this, if it is possible?

Thank you!


This can be achieved by storing the first phase score as a case property and then use that case property to calculate the final score in the second form as #case/first_phase_score + #form/second_phase_score. You can then have another case property to save the result (pass/fail) based on the final score.

Hi Shubham,

Thanks so much for the quick reply and helpful info.

Is there any way that the CommCare user would be able to receive a notification of the new case property status?

For example, once the second score is recorded, and it combines with the first score to become a “result” case property, is there a way for the CommCare user to know at that moment whether the person “passed” or “failed”? Or would it only be viewable to someone in CommCareHQ/by downloading the data?

Thank you!

There is no way currently to show a notification to the user based on a case property change though you can definitely show the result to the user in the CommCare form by referencing the case property in a Question Label. You can use the “Label” question type and reference the ‘result’ case property in the display text.

1 Like