Aggregating data in a parent case
Define a calculation in a parent case to aggregate the run-time values of properties in child cases.
- In the Explorer panel, click Cases, and then click the name of a parent case type.
- On the Settings tab, click Calculations.
- Click + Add calculation.
- Click + Add property.
-
In the Calculated property field, press the Down Arrow key and
select the name of a single-value property that is on a top-level page and stores an
integer, decimal, or double.
The calculated property stores the sum of other properties, across all child cases of the parent case.
CAUTION:Ensure that this property is not associated with a declare expression because the value of the property can be overwritten. - In the Case type field, press the Down Arrow key and select a class of a case type that is a child of your current case type.
-
In the Property field, press the Down Arrow key and select name
of a single-value property that is on a top-level page and is the same type as the
Calculated property.
At run time, the value of this watched property is added to the cumulative total of the calculated property.
- Click OK.
-
Click Save to create the pyCaseTypeAggregates
declare trigger that monitors the properties in the calculation.
At run time, the value of the calculated property in the parent case is updated each time that a child case is saved and one of the watched properties has changed. If your application is unable to obtain a lock on the parent case to update the calculated property, it retries every 30 seconds.