Managing Variables
You can use variables to refer to values or expressions in scripts. You can declare variables in a map or a process. Public variables with the variant data type appear in the Configuration tab. However, if you later change the initial value or delete one of these variables from the process or the map, the changes are not updated in the Configuration dialog.
Tip... You can also declare variables with scripting. Use the
Dim keyword to declare a local variable. Scope variables with the
Public and
Private keywords. For more information, see
Scoping Variables.
You can add new variables to a map or process or import variables from another map or process. After you add or import variables, add them in a script. For more information, see
Scripting.
You can do the following for global variables:
Adding Global Variables
To add a global variable to a map or a process
1. In the map or process file, go to the Configuration tab > Global Variables section.
2. Click
to add a global variable.
The Add Global Variable window is displayed.
3. Specify the required fields or options as provided in the following table.
4. Click Add.
The global variable is displayed in the Global Variables section.
Editing Global Variables
To edit a global variable
1. In the map or process file, go to the Configuration tab > Global Variables section.
2. Click the global variable that you want to edit and then click
.
The Edit Global Variable window is displayed.
3. Modify the required fields and options.
4. Click Save to save the changes.
Importing Global Variables
Import an existing variable to save time. Importing a variable adds the variable to the global variable list for the current artifact. This public variable is declared and instantiated, so that you do not have to do this in the code. After you import, you can edit the variable if required.
To import a global variable
1. In the map or process file, go to the Configuration tab > Global Variables section.
2. Click
.
3. Specify the file that you want to import and click Open.
After importing a process designer file, all the global variable present in the file are added to the Global Variable list.
Note: If you attempt to use an unavailable variable when scripting, an undefined variable error appears. Ensure the variable exists and then import it into your map or process.
An alert message appears if the imported process files does not contain any global variable.
Deleting Global Variables
To delete a global variable
1. In the map or process file, go to the Configuration tab > Global Variables section.
2. Click the variable that you want to delete and click
.
A message asking for confirmation is displayed.
3. Click Yes.
The selected variable is deleted from the Global Variables section.
Last modified date: 12/03/2024