Example calculations
This section gives some worked examples of typical calculations. For many of these examples, you will need to create some new business objects or attributes.
For information about creating business objects and attributes, see Object Designer.
The indentations in these calculations are very important, and set the scope of the functions. Therefore, if you copy examples from this document, make sure that the correct indentations are maintained when you paste them into the calculation editor.
The worked examples given are:
- Adding two attributes together
- Counting the number of notes added to an incident
- Time to breach
- Determining the priority from the urgency and severity
An outline of the following calculations is given after the worked examples:
- Calculating a user's age
- Calculating a user's length of service
- Calculating the most recent date in a collection
- Summing the values of the result of a calculation applied to all objects in a collection
- Calculations on collections of collections
- Generating text that includes data from your database