If your administrator has set up calculated elements in a document class in your library, when you edit your documents some or all of the following elements are automatically calculated:
- calculated properties: values of any type of custom property
- calculated settings, which make custom properties mandatory or hidden
- calculated titles
Note: Calculated settings are currently in private beta. To request access to the private beta, reach out to us: firstname.lastname@example.org.
Important: Calculated elements are read-only. You can't edit them manually.
Administrators can create and configure calculated properties in the administration interface.
This article explains how to use calculated elements in your document editor.
|Use calculated properties|
|Use calculated titles|
|Handle errors in calculated elements|
Use calculated properties
In the example below, the property "Next review date" is calculated from the values of "Issue date" and "Review cycle (months)". When you enter values in these properties, the unsaved calculated property "Next review date" appears with a blue side bar.
If you quit edit mode without saving, the calculated property is not saved. However, if you save your document, the calculated property is saved in your document.
Learn more: Edit custom properties
Use calculated titles
Calculated titles ensure consistent naming conventions for documents in a document class. If calculated titles are configured for a document class in your library, you can't manually edit the titles of your documents in the document class.
Note: Calculated titles can be configured in Document Management libraries only.
When you create a new document, a message in the title bar indicates that you can't define a title for your document because it's calculated automatically.
In the example below, the title is calculated from the values of the properties "Request ID" and "Reason". When you fill in these properties, you can see the title before you save your document.
Handle errors in calculated elements
Elements are recalculated in individual documents when operations are performed on the document, for example when:
- a user manually saves the document
- manual or automatic workflow actions are performed
- the permissions are changed in the document
Note: Documents can also be updated by custom scripts or the application programming interface (API).
The calculation can result in an error if:
- the result calculated doesn't match the calculated property type
- the formula can't be calculated for this document – this can be due to a variety of reasons, for example, if your library administrator introduces a new property in the formula used to calculate a title or property and the new property doesn't yet have a value defined
Notes: Library administrators can write formulas so empty values are handled correctly and you can save your document. Learn more: Getting started with formulas for calculated properties.
When there's an error in a calculated element, manual save is always blocked. However, you can still carry out the following operations:
- Delete a document
- Duplicate a document
- Create a new version of a document when the current version is in error
- Restore a previous version of a document when the previous version is in error
- Restore a document from the trash (administrators only)
When you perform one of the above operations in a document containing:
- a calculated title with an error: the title becomes Untitled
- a calculated property with an error: the value of the property is empty; the property isn't visible to end users, but library administrators and document managers (learn more: What are roles?) can see the property marked in error when they access the document editor in view mode
Tip: All users can search for documents with one or more properties in error. Learn more: Search for system properties and custom properties.
Note: If a calculated property in error is referenced in another calculated property, the second one will also be in error.
In the case of calculated titles, if you try to save your document without filling one or more of the properties used to calculate the title, an error message appears. In the example below, the property "Reason" is used in the formula and requires a value.
Tip: Administrators should ensure properties used to calculate titles are mandatory.