You are here: Data creation and management > Data type management > Creating a data model > Calculating the value of a field

Calculating the value of a field

After you add a field to your data model, you can use an expression to calculate the value of the field at run time. For example, you can associate the Total Time field with an expression that adds together individual values, such as hours and minutes, or generates a subtotal from a list of time sheets.

  1. Access the field, based on the way that it is defined in your data model.

  2. Click the Gear icon in the row of a field.

  3. Select the This is a calculated field (read-only) check box.

    Not all field types support this display mode.

  4. Define a calculation by calling a function, referencing properties in an expression, or creating an advanced expression.

  5. Click Submit.

At run time, the field is displayed in read-only mode. Your application evaluates the expression and stores the results in the property that is associated with the field.