Skip to content

Knowledge Base

White Paper Libary

Run VBScript Tool

What is the Run VBScript Tool?

The Run VBScript tool is used to create a task step that runs a Visual Basic Script using data produced by other steps in the task.

The step also provides access to the Memory feature which allows data produced by the step to be memorised into a Repository.

Run VB Script Tool Features

  • Copy-and-paste script into the editor from external documents.
  • Drag-and-drop common scripts from the Reference tab of the Task Browser dialog.
  • Memory feature to memorise task data created at run-time.
White Paper - Run VBScript

White Paper - Run VBScript

The Run VBScript white paper introduces the tool.

Download White Paper

Run VB Script Tool: Working with other Tools

The Run VBScript tool can directly interact with the following tools:

Consuming from Other Tools

The Run VBScript tool can consume objects exposed by the following tools:

IconTool NameTool Category
Database Query ODBC ToolDatabase Query (ODBC)Input and Data Connectors
Database Query OLEDB ToolDatabase Query (OLEDB)Input and Data Connectors
Import Flat File ToolImport Flat FileInput
Convert XML to Recordset ToolConvert XML to RecordsetFormat
Run VBScript ToolCreate Workflow JobFormat
Run VBScript ToolFormat as Flat FileFormat
Run VBScript ToolFormat as HTMLFormat
Run VBScript ToolFormat as HTML ProFormat
Run VBScript ToolFormat as TextFormat
Run Crystal Report Tool - Crystal Reports AutomationRun Crystal ReportFormat
Run Microsoft Reporting Services ToolRun Microsoft Reporting ServicesFormat
Run Microsoft Word (Merge) ToolRun Microsoft Word (Merge)Format
Run VBScript ToolFilter DataGeneral

Objects Consumed

The following objects, outputted by the above tools, can be consumed by the Run VBScript tool:

  • Recordset — Tabular data from any BPA Platform tool capable of exposing such data (see above)
  • Documents (Text) — Plain text documents
  • Documents (HTML) — Standalone HTML pages
  • Documents (Paged HTML) — Paginated HTML files
  • Documents (PDF)
  • Documents (RTF) — Rich text documents
  • Documents (XML)
  • Documents (CSV)

Exposing to Other Tools

As an Output category tool, Run VBScript does not expose any objects that can be directly consumed by another tool. However, it does expose the following objects which can be used in a task step sequence:

  • RecordSource — If an Input Recordset has been selected, this contains the columns included in the recordset
  • DocumentSource — If a Document Source has been selected, this contains the data in the document as recordset columns
  • Memory Definitions — If configured, this is a list of Memory Definitions created for the step and the recordset columns to be memorised for each one
  • Step Properties — Standard step properties are available allowing you to use statistical data of the tool

Run VB Script Tool: Step Configuration

To add a new Run VBScript step to an existing task, you either:

  • Click and drag the Run VBScript icon from the Task Browser to the task Design area.
  • From the task’s Design tab, right-click on empty space and select Add > Execute > Run VBScript.

For a detailed description of how to create new tasks, refer to the product help.

About the General Tab

Run VB Script Tool

The General tab is used to enter the following details for the step:

  • Name — Enter a meaningful name for the step
  • Description — If required, enter a description of this step
  • Use a Recordset — Enable this parameter if recordset data from a previous task step is required when running the script
    • Input Recordset — Contains all available recordsets from steps previously created in the task
  • Read documents from a source — Enable this parameter if document data from a Format task step is required when when running the script
    • Document Source — Contains all available documents from Format steps previously created in the task; note that the document format is displayed after the step name

About the Main Tab

The Main tab is used to enter the Visual Basic (VB) script for the step.

Run VBScript Tool

Enter the script in the text input area. Variables, properties, recordset columns, and so on can be dragged and dropped into the script from the Task Browser. Use Check Syntax for any errors that may be in the script — results are displayed in the box underneath your script.

Use Memory to memorise some or all of the step output for use in other task steps. This is particularly useful when the Run VBScript step is called multiple times — use Memory to compare the record previously processed to the new record currently being processed to avoid duplicates.

About the Options Tab

The Options tab allows you to define how errors in this step are handled at task runtime.

Run VB Script Tool

If an error occurs, you can decide whether the step should Continue processing, or terminate the step immediately (Abort Step).

If the step is aborted, you can choose to Continue processing onto the next step in the task, or terminate the whole task immediately (Abort Task).

If Run memory provider(s) after VB Script execution is enabled, then configured memory providers are run after script execution.

White Paper - Run VBScript

White Paper - Run VBScript

The Run VBScript white paper introduces the tool.