Using the Condition Builder to Create Conditional Statements

The Condition Builder enables you to create conditional statements for formula and condition components. Conditional statements are also known as If...Then statements. If the first part (the If part) of a conditional statement is true, then the second part of the statement (the Then part) is also true. If the first part of a conditional statement is false, then the second part may or may not be true.

To create a conditional statement:

  1. Right-click a formula, and then select Open.
  2. In the Component Designer, click the Add Condition icon.

    Two rows with various fields and drop-down lists that you use to build the condition are added to the Component Designer.

  3. In the first row, select whether the first statement in the condition should begin with IF, ELSE, or ELSE IF, and enter the text of the conditional statement. Or click the Add/Edit Condition icon to the right of the row to access the Condition Builder. The Condition Builder enables you to design a condition statement graphically.

    Although you can select IF, ELSE IF, and ELSE from the down arrow, by default, the first statement must be an IF statement.

  4. In the Condition Builder, select Metadata Condition or Data Condition.
  5. Do one of these tasks:
  6. Enter one of these operators:
    • = (equal to)

    • < (greater than)

    • > (less than)

    • <> (greater than or less than)

    • >= (less than or equal to)

    • <= (greater than or equal to)

  7. Do one of these tasks:
  8. Enter any comments for the condition.
  9. Click the + icon to add the condition to the Condition grid. (You can also use the + icon to create a copy of a selected row, and add it to the Condition grid.) Use the icon to replace a selected row in the Condition grid with a metadata or data condition.

    Tip:

    Use the up arrow and down arrow icons to reorder the condition statements in the grid. Use the Group and Ungroup icons to group (add parentheses to) and ungroup (remove parentheses from) parts of the condition statement. Change the And to Or, And Not, or Or Not by clicking in the field next to And, and using the drop down to select an option.

  10. Click OK to exit the Condition Builder dialog.

    The condition is inserted into the IF statement.

  11. Optional: Repeat step 2 through step 10 for each condition statement you want to create.
  12. Optional: For each additional condition statement, double-click in the first column to display a dropdown list from which you can select an operator to start each condition statement:
    • IF: You can start only the first condition statement with IF. (This is the default that displays only for the first condition statement you create.)

    • NOT IF: You can start only the first condition statement with NOT IF.

    • AND: You can start any condition statement (except the first) with AND when you want to create a compound of at least two condition statements.

    • OR: You can start any condition statement (except the first) with OR when you want to create a compound of at least two condition statements.

    • AND NOT: You can start any condition statement (except the first) with AND NOT when you want to include the condition statement that follows it with the formula component.

    • OR NOT: You can start any condition statement (except the first) with OR NOT when you want to exclude the condition statement that follows it from the formula component.

    Tip:

    Use the Group and Ungroup icons to add and remove parentheses from condition statements. To group or ungroup multiple condition statements, use Ctrl + Click or Shift + Click to select the condition statements you want to group or ungroup.

  13. Click OK.

    The condition statements are inserted into the Condition row.