Skip to Content

Create a global variable source in Jitterbit Design Studio

Introduction

A global variable can be configured as an in-memory source in Jitterbit. This lets the global variable be used anywhere that a source can be.

Create a global variable source

You can choose to create a new Global Variable source on its own, or within an existing operation. For more information on how sources work within operations, see Creating an operation. For details on global variables, see Global variables.

Create a new global variable source as a standalone source

Within your project in Jitterbit Design Studio, you create a new Global Variable source by any of:

  • Go to File > New > New Source; or

  • In the tree on the left, right-click on Sources and select New Source; or

  • In the top toolbar, click the green source icon attachment.

In the popup, select Global Variable as the type:

attachment

Your new source appears in its own New Source tab in the right pane of the window.

Note

If you create a standalone source using any of these methods, note that it is not connected to an operation. See Use an existing global variable source in an existing operation below to use the new source.

Create a new global variable source in an existing operation

A source is usually created by default when you create a new operation. (The exception is an operation that consists only of a script.) With an existing operation, you can specify the type of its source by:

  • Double-clicking on the source icon; in the popup, select Create New Source; or

  • Right-clicking on the source icon and selecting Create New Source.

In the configuration screen that appears, use the Type dropdown to select Global Variable, as shown above.

Use an existing global variable source in an existing operation

To use an existing Global Variable source in an existing operation with a source, you can set it by any of:

  • Within the operation, double-clicking on the source icon, and in the resulting popup, selecting the desired Global Variable source from the list; or

  • Within the operation, right-clicking on the source icon, choosing Select Existing Source, and in the resulting popup, selecting the desired Global Variable source from the list; or

  • Dragging the desired Global Variable source from the tree on the left and dropping it onto the existing source icon of the operation.

Configure a global variable source

After you have created a Global Variable source, the configuration screen will open in the main view of Design Studio. You can return to the configuration screen at any time by double-clicking on the source icon in the operation, or by double-clicking on the source in the tree on the left.

The configuration screen will appear similar to this example:

attachment

  • Name: Enter an appropriate, unique name for the source.
  • Type: Use the dropdown to select Global Variable, if it is not already specified.
  • Global Variable:

    • Variable: Enter the name of the global variable you want to use; either a name for a new global variable or the name of an existing global variable. If a new name is entered, the global variable will automatically be created.
      • To see a list of existing global variables, either double-click in the field entry area or type a single open square bracket ([). You can then choose one of the existing global variables.
      • Global variable names can be specified in this field with or without square brackets as of Harmony version 8.22.
  • Test Connection: Clicking the attachment button will test the Global Variable source; it will fail if the variable cannot be created in memory on the agent. This can happen if the agent is not reachable or the variable name is missing.

  • Click the Save button in either the main toolbar or the source's toolbar to save the configuration.

Tip

When creating new global variables, prefix the global variable name so that it is easy to look up later. For example: for a global variable such as org.api.response, as it is prefixed with org, it is easier to find with other related global variables that also use the org prefix.