Use the Variables window to create and modify user-defined variables and view system variables.
You can optionally display the Variables window by mapping the View.Variables command to a key combination of your choosing on the Keyboard page of the Options dialog box.
Add Variable
You can optionally display the Variables window by mapping the View.Variables command to a key combination of your choosing on the Keyboard page of the Options dialog box.
Add Variable
- Add a user-defined variable.
- Delete Variable
- Select a variable from the list, and then click Delete Variable.
- Show System Variables
- Click to toggle between a list that includes system variables and a list that does not. System variables are predefined. You cannot add or delete system variables or modify their properties. This list is color coded. System variables are gray, and user-defined variables are blue. The list includes variable properties.
- Show All Variables
- Click to toggle between a list that includes all the variables in a package and a list that filters the variables. If the Show All Variables option is not selected, the list includes only the variables in the scope of the package or the selected container or task; otherwise, the list includes all variables. If the Show System Variables option is selected, the list includes system variables. System variables are predefined. You cannot add or delete system variables or modify their properties. This list is color coded. User-defined variables are blue and system variables are gray. The list includes variable properties.
- Choose Variable Columns
- Click to open the Choose Variable Columns dialog box where you can change the column selection. Use the Variable Column Chooser dialog box to select the columns whose properties will display in the Variables window.
- Scope
- Select to display the scope of variables.
- Data type
- Select to display the data types of variables.
- Value
- Select to display the values of variables.
- Namespace
- Select to display the namespaces of variables.
- Raise event when variable value changes
- Select to display Booleans that indicate whether the variables raise the OnVariableValueChanged event.
- Name
- View the variable name. For user-defined variables, you can update the variable name.
- Scope
- View the scope of the variable. A variable has either the scope of the entire package, or the scope of a container or task. The scope of the variable must be sufficient so that the variable is visible to any other tasks or components that need to read or set its value. Scope cannot be modified in the Variables window, but depends on the item that was selected in the designer when you created the variable.
- Data Type
- View the data type of the variable. For user-defined variables, you can select a data type from the list.
- Value
- View the variable value. For user-defined variables, you can update the variable value. This value can be a literal or an expression.
- Namespace
- View the namespace name. User-defined variables are initially created in the User namespace, but you can change the namespace name. To display this column and change the namespace, click Choose Variable Columns and select the option in the Choose Variable Columns dialog box.
- Raise Change Event
- Indicate whether to raise an event when a value changes. By default, the Variables window does not list this column. Click Choose Variable Columns and select the option in the Choose Variable Columns dialog box.
- IncludeInDebugDump
- Indicate whether the variable value is included in the debug dump files.
For user-defined variables and system variables, the default value for the InclueInDebugDump option is true.
However, for user-defined variables, the system resets the IncludeInDebugDump option to false when the following conditions are met:
- If the EvaluateAsExpression variable property is set to true, the system resets the IncludeInDebugDump option to false.
To include the text of the expression as the variable value in the debug dump files, set the IncludeInDebugDump option to true. - If the variable data type is changed to a string, the system resets the IncludeInDebugDump option to false.
- If the EvaluateAsExpression variable property is set to true, the system resets the IncludeInDebugDump option to false.