Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

These calculations are advanced, and require complex expressions.

Retrieve the Case ID of the Parent of the selected case

In a form where a case was selected, the id of that case's parent (if one exists) can be referenced as

instance('casedb')/casedb/case[@case_id = instance('commcaresession')/session/data/case_id]/index/parent

Count of all Child Cases

You may want to get a count of all the open child cases that a specific parent case has. The expression you should use is: