Configuring Formula Fields on Objects
A Formula field calculates field value based on a Formula entered during field configuration. This allows Admins to derive a field’s value based on other data automatically. Formula fields are never editable; they simply display the calculated value.
Because Formula fields are calculated, rather than entered, they are not indexed, and so you cannot search or filter on Formula field values.
Create a Formula Field
You can add Formula fields to both custom and standard objects. To add an object field:
- From Admin > Configuration > Objects, click into the object.
- Click Edit and open the Fields tab.
- Click Create.
- Select Formula as the Field Type.
- Optional: Review the options for object fields.
- Select a Return Type (Text, Yes/No, Date, DateTime, Icon, or Number). Depending on the return type, you can configure additional options, such as a Minimum value or Maximum value. The Return Type must match the data type returned by your Formula Expression.
- Enter a Formula Expression. To use the Vault expression editor, click the Calculator icon to create a formula. Note that you cannot reference another formula-type field in your formula expression.
- Click Save.
For more detailed instructions on how writing the formula expression, see the Vault CDMS Formula Reference Guide.
Example: Incremental Task Due Dates
You can configure a formula field that increments a User Task record’s due date. The formula below adds a date seven (7) days from the Current Due Date field value.
Using Formula Fields for Icons
You can display icons on object records using a formula field. When configured, a formula field can display as an icon based on the formula’s evaluation. Icons display on object record list views and the object record details page.
To configure a formula field that displays an icon:
- Create a Formula type field.
- Select Icon as the Return Type.
- Click the Calculator icon in the Formula Expression field.
- Enter your Formula Expression. Use the
icon(name, color)function in your formula. When using the Vault expression editor, select your icon from Icons. You can use the Fields, Functions, Operators and Icons list to build your expression.
- To show an icon in the header of an object record details page, select Show in header. To indicate whether the icon should display left- or right-aligned in the header, select Left or Right. Note that only one icon can display in the header per object.
- Click Validate. If there are errors in your formula expression, correct them.
- Click Save.
Available Functions & Operators
For a list of available functions and operators available for use with formula fields, see the Vault CDMS Formula Reference Guide.
You can complete all steps in this article with the standard System Admin or Vault Owner security profile.
If you vault uses custom security profiles, your profile must grant the following permissions:
|Security Profile||Admin: Configuration: Objects: Create, Edit||Ability to create and edit Vault objects|
Learn more about permission sets.