Use the Assign Activity
Note: Use caution when building or editing a workflow. For further advice or to arrange training, contact your professional services consultant.
The Assign activity can be used to assign a value to a variable.
The Assign activity is located in the Runtime section of the Microsoft Toolbox.
Note: The minimum requirements for the Assign activity are To and Value.
The Assign activity consists of the following properties.
Section | This field | Holds this information... |
---|---|---|
Misc | DisplayName |
The title of the activity. Note: The DisplayName property is set to Assign by default. |
To | The property the value is assigned to. | |
Value | The code used to set or return a value within the workflow. Expressions must be entered in the Visual Basic (VB) format. |
Clicking the ellipsis button adjacent to the relevant field opens the Expression Editor, where you can enter the relevant code in the Visual Basic (VB) format.
The following example describes using the Assign activity to select values when a parameter is met:
-
Click the Microsoft Toolbox tab in the Activity section of Workflow Builder.
Drag and drop the Assign activity into the desired location in the Sequence panel.
-
Click the ellipsis button adjacent to the relevant field.
The Expression Editor is displayed.
-
Enter the relevant code in Visual Basic (VB) format.
-
Click OK.
Note: An exclamation mark symbol indicates a warning. Refer to Use the Warnings Panel for further information.
- Click Save.