Feedback

  • Contents
 

Variable Bar (View Menu)

The Local Variables window lists all the variables contained within the handler, the type of each variable, and the initial value of the variable.

Handler authors can right-click on variables shown in the variable bar to display a menu that allows them to:

  • Query what steps use the variable.

  • Delete the selected variables if they are not being used in a tool step.

  • Set an initial value for the variable if it is a Boolean, DateTime, Integer, Numeric or String type.

Note: Initial values are literal values only. You may not assign the initial value of a variable to an expression other than a literal expression.

  • Clear the initial value

  • Select all variables that are not used in tool steps.

  • Add variables

To create a new variable, select "Add New" from the menu that appears from right-clicking on the variable window. Interaction Designer will display the Declare Variable dialog. If the selected variable type for the new variable is of a type that allows for an initial value, the Create w/Initial Value button will be enabled.

images\ebx_292545046.gif

At this point we can either click Create w/Initial Value or click Create and set the initial value later by right-clicking the variable in the window and selecting "Set Initial Value…" from the menu that appears. For this example, let’s assume that we clicked on the Create button. Interaction Designer will automatically add the variable to the variable manager bar and then select it:

images\ebx_2128187865.gif

Interaction Designer now lets you assign an initial value to the variable:

images\ebx_-2127561086.gif

 

For this variable we will put in "Test String Value" (without the quotes). When setting the initial values for strings you do not have to escape the string. For instance, if you had an embedded quote in the string, it is fine to enter:

Bob said "Hi" 

You do not need to escape initial values by entering the following:

Bob said \"Hi\" 

A couple of other notes about the initial value dialog:

  • The dialog will enable / disable items depending on the variable type. Therefore, if you are setting the initial value for a Boolean variable, the Boolean Variable section at the top of the dialog will be enabled.

  • When setting the initial value for a datetime variable, you can set the value to be either a specific date/time such as February 2, 2001 at 5:00 AM. You also have the option to set it to Use Handler Start Time which sets the value to the time when Interaction Processor launched the handler.

Deleting Unused Variables In a Handler

All unused variables in a handler can be deleted by right-clicking on the variable bar and selecting the Select All Unused menu item. The variable manager selects all unused variables. Next, right-click the variable bar and click Delete Selected from the menu. The variables are deleted from the handler.

Remember that you can only delete variables that are not being used by a tool step. The Delete Selection item is not enabled for variables that are in use by any tool. To find what tools are using a given variable, right-click that variable and select Query Usage from the menu.