The Choice action is used to display a message box in which the user can choose from a list of items. The item selected then populates a variable. The variable must be created in an earlier step using the Create Variable action. The list can be displayed in any of four different ways and optionally can allow multiple selections or only one selection.
From the Task Builder Available Actions pane, open the Dialog folder and double-click the Choice action or drag it into the Steps pane. The following properties dialog box appears:
In the Message to display box, type the message, or click the Insert Expression/Variable button and use the Expression Builder to enter a variable or expression. Usually the message is a question for the user to answer.
In the List type box, select the list type to use. The Checkbox and List selections allow for multiple user selections. The Dropdown and Option selections allow for only one selection.
In the Populate variable with result box, select the variable to populate.
Enter the items to include on the list as follows:
Click the Add button and enter the caption (item to display on the list) and the value (item to populate the variable).
The item is added to the Items to include in list box.
Repeat the process above to add additional items. When you enter the item that you want to be selected when the choice box opens, click Selected. (Unless you clear the Force selection check box in the Advanced tab, at least one item must be selected.)
To make changes after items are added to the list, select an item and click Edit or Delete.
Click the Advanced tab.
In the Title box, type the text to be displayed in the title bar.
Under On cancel, select the action to be take if the Cancel button is clicked. The options are:
Fail the step: causes the step to register as failed, and initiates error handling.
Return the following value: returns a specified value. Enter the value in the box.
If you want the user to be able to OK the box without making a selection, clear the Force selection check box.
If you want to allow multiple selections, click Allow multiple selections. This is only active if Checkbox or List are selected as the List type.
To set a time-out that automatically selects the OK button after a specified period, select Automatically press the OK button after, and then enter the number of seconds to wait.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps