Calculation Process
Formulas of calculated fields are recalculated whenever there is a change in the content of a field, related field, or sub-form. Calculations are run either through administrative or user functions.
On this page
Administrative and user functions
Function |
Action |
Result |
---|---|---|
Administrative |
Calculations queued in an asynchronous job |
Administrator updates a formula of a calculated field and queues an asynchronous job. This job runs during normal processing based on the number of jobs in the queue. |
|
Calculations scheduled in an asynchronous job |
|
User |
Calculations recalculated inline |
|
Recalculation process
Type |
Description |
---|---|
Immediate |
Calculations are triggered by a user saving a record that is either 'marked' or changing a field that is used by a calculated field in the same level. 'Marked' content is changed to an ‘unmarked’ status when a user saves that content. An immediately applied calculation can be performed in a cross-referenced application 1 level away. For example, Application A is dependent on a calculated field in Application B. Application B has a cross-reference relationship with Application A. When a record is updated in Application B, its related record in Application A can be recalculated immediately when the user returns to Application A and clicks Apply or Save. Related records are updated when a user initiates the recalculation or the recalculation is updated through an asynchronous job.
|
Asynchronous jobs |
Queued asynchronous jobs run based on the number of jobs in the job queue. Scheduled asynchronous jobs run at a specified time regardless of any current activity on the record. Calculations are queued in an asynchronous job in various ways.
|
Example: Triggers for recalculating
Scenario 1 |
Results: Any calculated field dependent on that change is recalculated immediately. |
---|---|
Scenario 2 |
Results: Recalculations for the dependent fields are queued in an asynchronous job and is processed based on the number of jobs in the job queue. |
Asynchronous job processing
When you change the formula of a calculated field and schedules the recalculation in an asynchronous job, the content affected by this change has a status of ‘marked’ for recalculation.
When this condition exists, the following occurs:
- The asynchronous job is queued with all fields ‘marked’ for recalculation.
- The content is ‘marked’ for recalculation and can be recalculated immediately in View or Edit mode.
- Any calculated field in the same level with the content status of ‘marked’ is reset and is no longer ‘marked’ for recalculation.
When you change the formula of a calculated field but does not schedule the recalculation in an asynchronous job, the contents in this application affected by this change is not ‘marked’. When this condition exists, the content status is updated by a user saving the change or by the asynchronous job.
However, if you change 1 or more fields and only schedule an asynchronous job for 1 of the fields, all fields ‘marked’ for recalculation are included in the asynchronous job.
Example: Asynchronous Job Queued
Scenario |
There are 4 fields: Risk, Criticality, Controls, and Rating. Risk is dependent on the value of Criticality. SUM([Risk], [Criticality]). Field Controls is dependent on the value of Rating. IF(CONTAINS[Rating] “10”, RANK(REF([Controls] “5”))) |
---|---|
Action 1 |
Administrator updates both formulas of the calculated fields and schedules an asynchronous job to recalculate the fields. |
Results |
Formulas are updated in the applications. [Risk] and [Controls] are ‘marked’ for recalculation. |
Action 2 |
User with Read and Update permissions views the record in View mode. User notices message that content is not up to date and clicks Recalculate. |
Results |
[Risk] is recalculated immediately, and the updated value is displayed. [Controls] is recalculated immediately, and the updated value is displayed. |
Example: Asynchronous Job Not Queued
Scenario |
There are 4 fields: Risk, Criticality, Controls, and Rating. Risk is dependent on the value of Criticality. SUM([Risk], [Criticality]). Field Controls is dependent on the value of Rating. IF(CONTAINS[Rating] “10”, RANK(REF([Controls] “5”))) |
---|---|
Action 1 |
Administrator updates both formulas of the calculated fields and does not schedule an asynchronous job to recalculate the fields. |
Results |
Formulas are updated in the applications. [Risk] and [Controls] are not ‘marked’ for recalculation. |
Action 2 |
User with Read and Update permissions views the record in View mode. User is not notified that content is not up to date. |
Results |
Contents of [Risk] and [Controls] are not updated. |