The Expression Editor

Use the Expression Editor to create or modify expressions that are used in rules, for determining document classes, record classes, or access control lists dynamically, or for assigning property values.

About this task

Using the Expression Editor, you can set up advanced rules for conditional processing of documents. You can also set up expressions in tasks:

  • To determine document or record classes dynamically
  • To select access control lists dynamically
  • To assign property values

The Expression Editor interface consists of these sections:

Expression
This section shows the expression that you are working with. This might be a single expression or an expression tree. Depending on which expression fragment you select, different edit actions are available.
Description
This section contains a description of the selected expression fragment. The description comprises the name and type of the operator, a summary of what the operator does, the number of operands for this operator, and the operand types.
Edit Actions
In this section, you can select Edit, Replace, or Insert from the edit actions that are available for the selected expression leaf. Depending on the selected action, different prototype expressions become available that you can use when building the expression.
Prototype Expressions
This section lists the prototype expressions that can be used for the current type of operator and the edit action that you selected.

When the selected action is Edit, this section is replaced with an appropriate Edit section, where you can enter expression values.

From the Expression Editor toolbar, you can select the following actions:
  • Replace the selected expression fragment with an expression template that was saved previously.
  • Save part of an expression.
  • Save the entire expression.
  • Undo or redo changes.
  • Test the entire expression.
  • Test part of the expression.

Procedure

To edit an expression, follow these steps:

  1. Select an expression fragment in the expression tree.
    The expression fragment can be an operator or an operand.
  2. Select an edit action.
    Option Description
    Edit Edit the literal or metadata value of the selected expression fragment. For ConditionalMetadataReference, DynamicMetadataReference, and TestMetadataReference expressions, you can also enter test values, including testing with null values.

    To edit an expression value, continue with step 3.

    Replace Replace the selected expression fragment with another prototype expression. Only those expressions are available that have the same data type as the selected fragment.

    To replace an expression fragment in the tree, continue with step 4.

    Insert Insert a prototype expression as a parent to the selected expression fragment. Only those expressions are available that have the same data type as the selected fragment. In addition, at least one operand of the expression that you want to insert must have the same data type as the return value of the selected expression fragment.

    To insert an expression in the tree, continue with step 5.

  3. Edit the selected expression value.
    The layout of the Edit section depends on the data type of the operand.
    Boolean values
    Select TRUE or FALSE.
    Byte, Float, or Integer values
    Enter a value or use the up and down arrows to select a value.
    Metadata
    Select a metadata source and a property to be evaluated. Different document sources create different formats, each with properties specific to its type. The properties that are available change depending on the selected metadata source.
    String values
    Enter a value.
    Arrays
    Enter a value and click the Plus button to add the value to the list of values. You can manipulate the list with the buttons to the right. To prevent duplicate values from being added to the list, select Prevent duplicates. Or, you can remove duplicates from the array before the expression tree is updated by clicking the respective button to the right.
  4. To replace an expression in the expression tree, complete these steps:
    1. In the Prototype Expressions section, select the expression that you want to use.
    2. To update the expression tree with the selected operator, double-click your selection.
  5. To insert an expression as a parent to the selected expression fragment, complete these steps:
    1. In the Prototype Expressions section, select the expression that you want to use.
    2. To update the expression tree with the selected operator, double-click your selection.
  6. Repeat steps 3, 4, or 5 for each expression that you want to modify.
  7. Test your expression.
    Test expression fragments or the entire expression.
  8. Click OK to save your changes, or Cancel to close without saving.

Results

If the rule or the expression has any errors, the entire task route is rendered invalid and is, therefore, not run.