Calculated Attributes

Overview

An attribute calculation can be defined on the template on the Add/Edit Attribute dialog accessed via the Data Panel or a Form section. Note: this capability is limited to custom text, numeric, checkbox, hyperlink, date attributes, date and numeric attribute Data Sets, and associations.

The calculation is defined using the Shibumi expression language and, when an expression is defined, users cannot edit the value (i.e., it is read-only). Calculated attribute values cannot be set by Business Rules. If a Set Value business rule attempts to set a value to a calculated metric, attribute or attribute data set, the business rule will fail.

Configuring Calculated Attributes on the Data Panel

In the Create/Edit Attribute dialog for a custom attribute or association:

  • Toggle the Calculation / Editable Rule field to ‘Calculated ’. Enter a calculation into the field using the Shibumi expression language. Syntax validation will appear below the field.
  • Click the Save or Create button to save the calculation and attribute details.
  • Publish the template to apply changes to instances.

Notes:

  • If an attribute has a calculation, it will show as Calculated in the Editable Rule column on the Data panel.
  • If the attribute is a Date or Number, and has Data Sets enabled, then the calculation can be individually defined for each of the Data Sets.
  • If there are calculation errors within an attribute value (divide by zero, invalid reference, etc.), a red warning icon will appear in the List, View or Form. Hover over the icon for details.
Updated on September 10, 2023

Related Articles