Defining conditions

You can define one or more conditions when you are defining an action on a workflow. For each condition, you build a comparison statement with two fields and an operator.

By default, all conditions must be met in the following scenarios:

  • For an action to be displayed on the Actions button when the conditions are on that action.
  • For an operation to complete when the conditions are on that operation.

To override this default behavior, define Advanced Logic to combine the conditions in a specific way.

Tip: When you add a condition that compares a field on a related object with a field on a current object, specify the field on the related object as the first field in the comparison statement. If you do not specify the field on a related object as the first field and the objects are not associated, an Invalid object reference error message is displayed when the action runs.

Procedure

  1. Click New Condition.
    The When panel opens.
  2. In Compare, you define the first field in the comparison statement.
    You can choose:
    • A field in the current object

      Select an Object Field.

    • A field in a related object
      • Select Direct Child, Direct Parent, Ancestor, or Descendant in Relationship Type.
      • Select an object type in Related Object Type.
      • Select a field in Related Object Field.
      • Select a path in Relationship Paths (displays only if Relationship Type is Ancestor or Descendant).
      • Add Filter By conditions.
      • Set Primary Parent Only (displays only if Relationship Type is Direct Parent or Ancestor).
    • A field in a Preference object

      Select a Preference Object Field. You can add Filter By conditions.

    • End User

      An End User condition checks whether the signed on end user is a specified user and whether the user is in a specified user group. The second field in the comparison statement is a specified value, an expression, or an actor field on an object.

  3. In Using, choose an Operator. The list of operators depends on the field type of the field that you chose in Compare.
  4. In To, you define the second field in the comparison statement. You can choose:
    • A specified value

      The value that you can provide depends on the field type of the field you chose in Compare. The comparison is case-sensitive, so ensure that you specify the correct case for the value.

    • An expression

      Enter an expression that uses a single field or variable from the list in Using variables, functions, and fields. All the variables and fields listed there can be used in an expression. The field or variable must be in the specified format. It can be part of a longer string. For example, you can specify a file name like Evidence_[$Parent:SOXRisk/System Fields:Name$].pdf if you want to validate that the parent object has a specific PDF attachment.

    • A field in the current object

      Select an Object Field.

    • A field in a related object
      • Select Direct Child, Direct Parent, Ancestor, or Descendant in Relationship Type.
      • Select an object type in Related Object Type.
      • Select a field in Related Object Field.
      • Select a path in Relationship Paths (displays only if Relationship Type is Ancestor or Descendant).
      • Add Filter By conditions.
      • Set Primary Parent Only (displays only if Relationship Type is Direct Parent or Ancestor).
    • A field in a Preference object

      Select a Preference Object Field. You can add Filter By conditions.

  5. If you chose a date field in Compare, you can define an offset in Adjust Date By.
    • A specified value and enter Number of Days.
    • A field in the current object
    • A field in a related object
      • Select Direct Child, Direct Parent, Ancestor, or Descendant in Relationship Type.
      • Select an object type in Related Object Type.
      • Select a field in Related Object Field.
      • Select a path in Relationship Paths (displays only if Relationship Type is Ancestor or Descendant).
      • Add Filter By conditions.
      • Set Primary Parent Only (displays only if Relationship Type is Direct Parent or Ancestor).
    • A field in the Preference object

      You can add Filter By conditions.

  6. Click Done.
    The condition is numbered and saved. Conditions are numbered consecutively in the order that they are defined.
  7. Optional: Repeat the previous steps to add more conditions.
  8. Optional: Set Advanced Logic to true to override the default rule that all conditions must be met. Write a statement in Logic. Use the condition numbers together with the operators and, or, not, and parentheses.
    The order of operations is: (), NOT, AND, OR.
    For example:
    • 1 or 2 or 3
    • 1 and (2 or 3)
    • 1 not (2 or 3)