Skip to Content

Create a global variable target in Jitterbit Design Studio

Introduction

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

Create a global variable target

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

Create a new global variable target as a standalone target

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

  • Go to File > New > New Target; or

  • In the tree on the left, right-click on Targets and select New Target; or

  • In the top toolbar, click the blue target icon attachment.

In the popup, select Global Variable as the type:

attachment

Your new target appears in its own New Target tab in the right pane of the window.

Note

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

Create a new global variable target in an existing operation

A target 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 target by:

  • Double-clicking on the target icon; in the popup, select Create New Target; or

  • Right-clicking on the target icon and selecting Create New Target.

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

Use an existing global variable target in an existing operation

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

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

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

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

Configure a global variable target

After you have created a Global Variable target, 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 target icon in the operation, or by double-clicking on the target 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.0.
    • Append to data: If checked, data will be appended to the value of the existing target variable instead of overwriting its value.

    • End of Line Type: Specifies how Jitterbit writes line breaks when writing to a target. End-of-line characters in the data will not be converted. Available options:

      • Default: Standard end-of-line characters for the platform the agent is running on.
      • Windows: CRLF (ASCII 13 and ASCII 10)
      • Unix: LF (ASCII 10)
  • Test Connection: Clicking the attachment button will test the Global Variable target; 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 target'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.