If your administrator has set up conditional logic in a document class in your library, when you edit your documents conditional logic is applied as follows:
- property values can be calculated automatically
- properties can be conditionally mandatory or hidden
- document titles can be calculated automatically (in Document Management libraries only)
– Properties and titles that use conditional logic are read-only. You can't edit them manually.
– Administrators can apply conditional logic to any type of custom property. Learn more:
Create and configure custom properties and Create formulas for conditional logic
This article explains how to use conditional logic in your document editor.
|Calculate property values automatically|
|Use conditionally mandatory or hidden properties|
|Calculate document titles automatically|
|Handle errors in conditional logic|
Calculate property values automatically
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 value is not saved. However, if you save your document, the calculated property value is saved in your document, like standard property values.
Learn more: Edit custom properties
Use conditionally mandatory or hidden properties
In the example below, the property "Please specify" is conditionally mandatory and hidden. If any value except "Other" is defined for the property "Billing country", the property "Please specify" remains hidden. If "Other" is selected for "Billing country", the property "Please specify" is no longer hidden and becomes mandatory. A banner appears, indicating that the mandatory property "Please specify" must be filled in.
After filling in "Please specify", you can save your document.
Calculate document titles automatically
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.
Tip: Administrators should ensure properties used to calculate titles are mandatory.
Handle errors in conditional logic
Properties or titles that use conditional logic 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 the application programming interface (API).
The calculation can result in an error if:
- the result calculated doesn't match the expected property type – in the case of calculated property values
- an error occurs when calculating the formula for this document
– Library administrators can write formulas so empty values are handled correctly and you can save your document. Learn more: Getting started with formulas for conditional logic.
– If a property with a calculated value that results in an error is referenced in another property with a calculated value, the second one will also be in error.
Tip: All users can search for documents that have (or don't have) a calculation error in one or more calculated property values or in their calculated title. They can also display them in views. Learn more:
– Search for system properties and custom properties
– Use views (beta version) in your AODocs libraries
What happens if there's an error in the conditional logic?
When a document has an error in its conditional logic, manual save is always blocked, except in the case of conditionally mandatory or hidden parameters with a fallback behaviour defined. Learn more: Calculation errors in conditionally mandatory or hidden properties
However, you can still carry out the following operations:
- Delete a document
- Delete a document permanently (administrators only)
- Duplicate a document
- Move a document to a different folder
- 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)
- Manually check out a document
Check-out a document via workflow – learn more: Types of workflow transition
Discard a draft document via workflow – learn more: Types of workflow transition
- Manually edit the permissions of a document – learn more:
- Propagate permissions in a Document Management library (administrators only)
Below is a description of what happens when you perform one of these operations in a document with a calculation error.
Calculation errors in calculated titles
The calculated title becomes Untitled.
Calculation errors in properties with calculated values
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.
If a conditionally mandatory or hidden property has a fallback behaviour set in the event of a calculation error, the property becomes:
- mandatory or optional (for conditionally mandatory parameters)
- hidden or visible (for conditionally hidden parameters)
In this case, users can save the document. Learn more about how administrators can configure a fallback value to prevent errors occurring.
If a conditionally mandatory or hidden property doesn't have a fallback behaviour set in the event of a calculation error, the calculation error remains and users can't save the document until the error is corrected. If they try to save the document, an error message opens.
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. They can press the blue warning triangle to view the error message.