Configure conditional logic to calculate property values

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:

Learn more: What is conditional logic in AODocs?

Important:
– You can apply conditional logic to any type of custom property. Learn more: Create and configure custom properties.
– Don't combine conditional logic with custom scripts

This article explains how to create and edit formulas used to calculate property values. 

Create formulas to calculate property values
Edit formulas

Create formulas to calculate property values

1. Access the document class settings in the library administration.

2. Create a standard custom property.

3. Activate the switch Calculate the value of this property.

4. Press Write formula.

image01.png

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.

Learn more:

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.

image02.png

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.


Edit formulas

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.

image03.png

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. 

Was this article helpful? 0 out of 0 found this helpful
If you didn’t find what you were looking for, don’t hesitate to leave a comment!
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.