Introduction
This article describes how to create variables that are over 1MB in size.
Problem
At the time of writing, you cannot paste data over 1MB in size directly into the Variables Properties interface — this applies to both global and task variables
Variables are created and used extensively throughout and can either have fixed values or values that are dynamically populated when a task is run.
Task variables are only available for the specific task they are created for. Users with Task Administrator rights can create task variables..
For example, you have a base64 encoded image that you want to use in a task. You want to pass the image through the task using a variable rather than through a recordset. When you paste the base64 string into the variable, it is truncated.
Solution
Instead, you use a separate tool that reads the data in and populates the variable for you.
Required Tools
To resolve this situation, you need the following tools:
| ► | Run VBScript |
| ■ | If creating a global variable |
Populating the Variable
Whether creating a global or local variable, do the following:
- Save the variable contents to a text file in a location accessible by your BPA Platform instance.
- Create a blank global or task variable as required, that is, leave Current Value (global variables
Variables are created and used extensively throughout and can either have fixed values or values that are dynamically populated when a task is run.
Global variables are available for all tasks in this BPA Platform installation. Once created, global variables can be used by any task.) or Default Value (task variables) blank.
| ■ | The variable must be Type: Variant |
| ■ | If a task-level variable it must also be a Parameter variable, with Parameter Attributes set to In, Out |
| ■ | For task-level variables, Scope can be set to either Task or Task Instance depending on your task requirements |
- Add a Run VBScript step to the relevant task.
- Add a meaningful Name to your step.
- Go to the Main tab.
- Add the following script:
filePath = "<folder_path_and_filename>"
Set objFile = CreateObject("Scripting.FileSystemObject")
Set objText = objFile.OpenTextFile(filePath)
text = objText.ReadAll
objText.Close
Set obj = Nothing
Set objFile = Nothing
where folder_path_and_filename is the full path to the variable's text file.
- Drag the variable from the Task Browser to the end of your script and add
<space>=<space> textafter it.Your script should now look like:

The example above uses a global variable (
System.Variables). If using a task variable, it showsVariablesinstead. - Click OK to save and close the step.
The empty variable is now populated and available for use in another or same task.