Calculated list item field example
Calculated list item fields can return list values mapped to calculation results, such as risk level based on selected values for issue severity and occurrence. These fields can use either a formula or the table lookup method to return values.
Formula
List item fields that use a formula to calculate values must return a numeric value. The numeric result is mapped to a list value, which is generated as the field output. The following example shows the configuration for a list item field that uses a formula to calculate a risk score from values assigned to severity, occurrence, and detection inputs.
The following formula calculates the risk score.
Item.mappedValue("Severity") * Item.mappedValue("Occurrence") * Item.mappedValue("Detection")
To return a numeric value, the input field values are mapped to numbers used in the calculation.
To generate a list value output, a set of conditions are configured to map the calculation result to a list item. The conditions run top to bottom until the result matches a mapped list value, which is the field's generated output.
Table lookup
The following example calculates the same risk score using the table lookup method. Instead of mapping input and output values to numeric values, list items are mapped to each possible combination of input values. When the list item field value is calculated, the mapped list value is generated as the output.