With AODocs, you can set up conditional logic in document classes in any type of AODocs library. When users edit their 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)
Learn more: What is conditional logic in AODocs?
This article explains how to create and edit formulas used to calculate property values.
|Create formulas to calculate property values|
Create formulas to calculate property values
3. Activate the switch Calculate the value of this property.
4. Press Write formula.
5. Write your formula.
Note: The formula builder is the same for all types of conditional logic. Learn more: What is the formula builder?
You can select the following entities to use in your formula:
- Custom properties from the document:
– in the left panel, select From document > Properties and then press the required type of property, for example, String/Text, Date/Time, Categories
– in the right panel, choose from the properties of the selected type available in your document
- System properties:
– in the left panel, select System properties
– in the right panel, choose the require system property
- Sequence IDs from the document:
– in the left panel, select From document > Sequence ID
– in the right panel, choose the required sequence ID
- Category values from the library:
– in the left panel, select From library > Category values and then press the required category
– in the right panel, choose from the category values defined at the level of the library
- Workflow states from the library
– in the left panel, select From library > Workflow states
– in the right panel, choose the required workflow state
Note: Depending on the document class and library configuration, some entities may not be available. For example, if the document class has no associated workflow, the workflow states section isn't displayed in the formula builder.
- Getting started with formulas for conditional logic
- Add entity references to your formulas
- What's the difference between category values in properties and category values defined at the library level?
- Handle property values that are empty or that have missing elements
This example shows a Date property whose value will be calculated from the number of months in the "Review cycle (months)" property after the "Issue date" property.
6. Press Create.
7. Press Save.
Learn more about how end users use calculated property values in their documents: Use conditional logic in your AODocs documents.
1. In the document class settings in the library administration, expand a calculated property to display its full information.
Note: Properties whose values are calculated can't be mandatory and are always read-only. You can't modify these two fields. However properties whose values are calculated can be hidden.
2. Press the pencil button under Formula. The formula builder opens.
3. Edit your formula and press OK.
4. Press Save.
Note: If you didn't define a property as calculated when you created it, you can't define it as calculated in the user interface once you have saved it. This can be done only by API.