Calculated field templates

You use a calculated field template when you add a calculated field to a record type. The following templates are available:

Template Parameters Description
Field value changes count field

Integer. Number of times the value of the selected field changed.

Note If you use this template for a calculated field, when a new record is created:

  • If the relevant field is then populated, that is counted as a change.

  • If the relevant field is not populated, it is not counted as a change until the field is later populated.

Was record in phase phase Boolean. Whether the record was ever in the selected phase.
Was field assigned with value

field

value

Boolean. Whether the selected field was ever populated with the specified value.

Phase duration phase

Total time the record was in a selected phase.

Note If the record is in the selected phase more than once, the phase duration is the total accumulated time spent in the phase.

Duration between phases

entered/exited

phase

Total time between the following:

  • The record entering (or exiting) the first specified phase, and

  • The record entering (or exiting) the second specified phase.

    Note Where the record enters (or exits) the second specified phase more than once, the time is measured to the last entry or exit,

Duration between events

field

to/from

value

Total time between the following:

  • First selected field changing to (or from) a value, and

  • Another selected field changing to (or from) a value.

    Note Where the second field changes to (or from) a value more than once, the time is measured to the first change to (or from) a value, as appropriate.

Calculated field example

The following example shows how to use the Duration between events template to create a calculated field that measures the time it takes to assign a change record. This is done by tracking a change to the Owner of the change record.

  1. From the main menu, select Administration > Configuration > Records > Fields.

  2. Select Change in the drop-down list at the top of the page.

  3. Click New calculated-field.

  4. Select Duration between events from the list of templates that is displayed.

  5. In the template:

    1. Click the first field.

      Duration between events template - first field parameter

    2. Select Owner from the drop-down list, and click OK.

    3. Click the first changed to/from.

      Duration between events template - first changed to/from parameter

    4. Select Changed to from the drop-down list, and click OK.

    5. Click field.

      Duration between events template - second field parameter

    6. Select Owner from the drop-down list, and click OK.

    7. Click changed to/from.

      Duration between events template - second changed to/from parameter

    8. Select Changed from from the drop-down list, and click OK.

    9. Click OK.

      Duration between events template - completed

    10. Edit the Name and Multilingual label for the field as required.

    Note Both the value parameters remain empty.

  6. Click Create.

Related topics