If Activity Designer

 

The If activity evaluates a condition and executes an activity depending on the results of that evaluation. This activity is most useful when using a procedural modeling style of programming. An If activity can be nested inside a Sequence activity or a Parallel activity, for example. If you are using a Flowchart activity, consider using a FlowDecision activity instead.

The following table shows the most useful If activity properties and describes how to use them in the designer.

Property NameRequiredUsage
ConditionTrueThe condition that determines which child activity to execute. To set the Condition, type a Visual Basic expression in the Condition box on the If activity designer or in the property grid.
ElseFalseThe activity to execute if the Condition is false. To add an activity that is executed by the Else branch, drop an activity from the Toolbox into the Else box on the If activity designer with hint text “Drop Activity Here”.
ThenFalseThe activity to execute if the Condition is true. To add an activity that is executed by the Then branch, drop an activity from the Toolbox into the Then box on the If activity designer with hint text “Drop Activity Here”.

Sequence
Parallel
Control Flow

Show: