Share via


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.

If Properties in the Workflow Designer

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

Property Name Required Usage

Condition

True

The 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.

Else

False

The 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”.

Then

False

The 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”.

See Also

Concepts

Sequence Activity Designer
Parallel Activity Designer

Other Resources

Control Flow Activity Designers