Calculated

Calculated fields calculate their value from other fields.

The value of calculated field updates whenever the fields it depends upon are updated. No value is stored for calculated fields.

Relevance rules

You can define relevance rules for calculated fields. If a calculated field is not relevant, its calculated value will be blank.

For example, if you define a calculated field with the formula CONCAT(FIRST_NAME, " ", LAST_NAME) and define the relevance rule as TYPE == PERSON, then the value is calculated as if the formula was IF(TYPE == PERSON, CONCAT(FIRST_NAME, " ", LAST_NAME)).

Data entry

The values of calculated fields are displayed as read-only fields during data entry.

Desktop data entry

In the screenshot below, the “Full name” field is a calculated field derived from the “First Name” and “Last name” fields.

Hiding from entry

If you do not want the calculated field to appear in the data entry form, you can check the “Hide from entry” option in the Form designer:

This is useful if you want to use a calculated field for analysis but the value is not needed during data entry.

Importing

Calculated fields are always calculated from other fields, and so can’t be imported or changed directly.

Limits

The maximum length of a calculated field formula is 1,024 characters.

If your formulas are longer than this, consider beaking your formula into several calculated fields. Calculated fields can reference other calculated fields.

Formulas

ActivityInfo’s formula language is based on formula languages used by Excel and similar spreadsheet programs. Read more in the Formulas Manual.

Next item
Date