Adding lookups to display valid field values when mapping fields in a flow



When developing your connector, you can add lookups to the connector configuration. Use lookups to retrieve valid values for any trigger output fields or action input fields from the target application. For example, you can display a list of companies to select one specific company. 

A lookup can be referenced by a field. When the field is selected while developing a flow in BMC Helix Integration Studio, the doLookup() method of a connector is called, and the value list returned is displayed in the UI. 

To add or update a lookup

  1. To open BMC Helix Connector Designer in your browser, go to https://localhost:3000/.
    1. On the Connectors tab, click the name of the connector in which you want to add or update a lookup. 
    2. On the Connector Properties tab, click the Lookups tab, and perform one of the following actions:

      • If you are adding a lookup, click icon_lookups.png.
      • If you are updating a lookup, from the Lookups list click the lookup name.

      newLookup.png

  2. Enter the lookup details as described in the following table:

    Field

    Description

    Lookup Name

    A short description of the action to be taken when the flow is initiated (for example, Add new record, Update record).

    Definition Source

    Select the source for defining the lookup fields. You can enter the information manually, or use an API definition file or JSON definition file to automatically generate the fields. The following options are available:

    • Enter it manually—Manually add the lookup input and output fields, without any definition files.
    • Swagger—The lookup input and output fields will be generated from a request endpoint (typically for GET) that is described in an API definition file. You can upload an API definition file from the API Definitions section under the General tab.
      For more information, see Adding-an-API-definition-file-to-generate-fields-related-to-the-connector.
    • JSON—The lookup input and output fields will be generated from a JSON snippet or file.
      For more information, review the steps to add input and output fields.

    For JSON or Enter it manually

    URL

    Enter the API endpoint for the lookup.

    Method

    Select the HTTP method for the API endpoint. The allowed methods are: GET, POST, PATCH, PUT, DELETE.

    For Swagger

    Swagger File

    Select the swagger file that contains the lookup definition.

    For more information, see Adding-an-API-definition-file-to-generate-fields-related-to-the-connector.

    Request

    Select the request to execute the lookup. This is typically a GET call. Refer to your connecting application's API reference.

    Create Fields

    Click this option to automatically generate input and output fields for the selected request under the Input fields and Output fields tabs.

  3. To add the lookup fields, enter the details as described in the table below: 

    Property

    Description

    Lookup Returns

    Select if you want the lookup to return data or labels.If the display label and the internal value are different, select Data and Labels.
    Both values are displayed in the result. However, only the display labels are used. The connector switches between the internal values and display labels.

    Display Name

    Enter a display name for the field in BMC Helix Integration Studio.

    Field Name

    The actual field name in the target application of the flow to be created by using this connector.

    (Optional) Description

    Enter a brief description of the field.

    Type

    Select the field type.

    Show by default

    Indicates if the field is displayed in BMC Helix Integration Studio.

    By default, this value is set to True.

  4. Select the associated fields required by the lookup from the fields displayed in the Lookup Filtering section.
    The fields are populated from the target application with the associated fields for the lookup field defined. 
  5. To add the lookup field, click Add.

To delete a lookup

  1. To open BMC Helix Connector Designer in your browser, navigate to https://localhost:3000/.
  2. On the Connectors tab, click the name of the connector from which you want to delete the lookup.
  3. On the Connector Properties tab, click the Lookups tab.
  4. Select the required lookup field, and click icon-delConnector.png.

Where to go from here

Building-connectors

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*