Attachmate Verastream Bridge Integrator Guide


Creating Variables

You can create variables to use as inputs or outputs to your API calls. Variables are strictly typed, and four types are supported:

Drag-and-drop operations automatically create variables and assign them to parameters. You can also create and edit variables using a combination of the Variables view and Properties view.

To create a variable
  1. With a project open in the designer, navigate to the screen that has the field for which you want to provide a variable input or output.

  2. Do one of the following:
    To create a variable to use as
    Do this
    Input to an API call
    1. From the Variables view, click the New Variable toolbar button.

    2. From the New Variables dialog box, in the Name field, type a variable name.

    3. From the Type list box, select a data type.

      The types followed by "[]" are arrays.

    4. (Optional) In the Default Value field, type the default value.

      Type array values separated by semicolons; for example:

    5. (Optional) Select the Treat As Sensitive Data check box to have the designer protect data provided to this variable (the designer will display the data as asterisks).

      For more information about this option, see Protecting Sensitive Data.

    6. Click OK.

    7. From the Variables view, drag the new variable onto the Offline Review view, until the target field is highlighted. The target field must be an unprotected host field.

      A setFieldValue API call is added to the API Calls view under the associated host screen, with your new variable set as the input value.

    Output from an API call
    • Drag the target host field from the Offline Review view to a blank space the Variables view.

      A getFieldValue API call is added to the API Calls view, under the associated host screen, with your new variable set as the output value.

      Note You can also drag a host field to an existing variable, to assign that field's value to the variable.

    Your new variable is created and available for use in the generated code.

Related Topics
Bullet Generating Host Access Code
Bullet Protecting Sensitive Data
Bullet Recording Bridge Interactions