If Action—Setting Properties

The If action is used to set up conditional steps that will be performed only if a certain condition is met. For example, if you were using a Loop action to retrieve a series of records, but didn't want to retrieve more than 100, you could set up an If action with the specification Count=100. This would be followed by a Break action to break the loop and then an End If.

You can use Expression Builder to create simple or complex If expressions. When you create an If step, an End If step is created automatically. Place the steps to be preformed if the condition is met between the If and the End If steps. When entering If properties, any string literal (text to be evaluated literally) must be enclosed in quotes ("literal text").

The steps between the If step and the End If step should be indented for visual clarity.

To set If properties

  1. From the Task Builder Available Actions pane, open the Flow folder and double-click the If action or drag it into the Steps pane.

  2. Select Simple or Complex.

  3. If using a simple expression, enter the first operand in the first box. Then select the operator from the drop-down list, and enter the second operand in the second box. Example: Operand:City, Operator: is, Operand: Los Angeles.

    You can click the Insert Expression/Variable button and use the Expression Builder to enter variables or create expressions in either operand box.

  4. If you are using a complex expression, click the Insert Expression/Variable button and use the Expression Builder to create it. Example: Variable1 = "Los Angeles" & Variable2 = "Customer"

  5. To set the Description tab properties, refer to Description Tab Options.

  6. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  7. When finished, click OK to save settings and close the properties dialog window.

To auto-indent after all steps are added

  1. In the Task Builder Steps pane, hold down SHIFT and click the first and last steps in the block so that the complete block of steps is selected.

  2. Click the Format button .

See Also

About Actions

Adding Task Steps

If Action

End If Action-Properties