Configure properties to be conditionally mandatory or hidden

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:

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 configure properties to be conditionally mandatory or hidden in the administration interface.

Configure a formula to make properties conditionally mandatory or hidden
Remove conditional logic

Configure a formula to make properties conditionally mandatory or hidden

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

2. Create and save a standard custom property, then expand the property to display its full information.

Notes:
– You must save your custom property before configuring it to be conditionally mandatory or hidden.
– You can't set booleans or properties whose values are calculated to be conditionally mandatory because these properties can never be mandatory. 

3. Under Mandatory or Hidden, select the Write formula option, which is available when you press the formula (fx) button.

Tip: Under Hidden, you can select Display property only if mandatory. The formula for this frequent use case is created immediately.

image01.png

4. 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.

Tip: Select Hidden (true or false) or Mandatory (true or false) to insert the code in your formula builder for the frequent use cases of referring to whether the property is mandatory or hidden.

Learn more:

5. Select the required behaviour of the property in the event of a calculation error with your formula. 

Fallback behaviour for conditionally mandatory properties:

  • Mandatory: the property will be mandatory and users won't be able to save the document until it's filled in
  • Optional: the property will be optional and users will be able to save the document without filling it in

Fallback behaviour for conditionally hidden properties:

  • Hidden: the property will be hidden and users will be able to save the document
  • Visible: the property will be visible and users will be able to enter a value and save the document

Alternatively, you can choose to Keep the calculation error. A warning sign will appear next to the property and users won't be able to save the document until the error is corrected by a library administrator or document manager.

Learn more: Handle errors in conditional logic.

The example below shows a String property "Please specify" which becomes mandatory when the user selects the value "Other" in the property "Billing country".

image02.png

6. Press OK

7. Press Save.

Note: When you configure one or more properties to be conditionally mandatory or hidden, any mandatory or hidden settings defined for the creation phase of documents are deactivated.

Tip: To edit your formula after saving, press the left side of the formula tag.

Learn more about how end users use properties that are conditionally mandatory or hidden in their documents: Use conditional logic in your AODocs documents.


Remove conditional logic

To remove the formula that makes properties conditionally mandatory or hidden, press the cross on the formula tag, then confirm. 

Any mandatory or hidden settings in place before you configured conditional logic are reapplied to your property, including those defined for the creation phase of documents.

image03.png

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.