While Activity Designer

The While activity executes the activity contained in its Body while the specified condition evaluates to true. The contained activity may never execute. If you want the contained activity to be executed at least once, use the DoWhile activity instead.

While Properties in Workflow Designer

The following table shows the most useful While activity properties and describes how they are used in the designer.

Property Name Required Usage
DisplayName False Specifies the friendly name of the While activity designer in the header. The default value is While. The value can be edited in the Properties window or directly on the activity designer header.

Although the DisplayName is not strictly required, it is a best practice to use one.
Body False Contains the activity to execute while the Condition evaluates to true.
Condition True Contains the Visual Basic expression that is evaluated to determine whether the activity in the Body is to be executed.

See also