Create a connector for a server script

In this topic, you learn how to create a connector for a server script.

The server script must return an array of objects with the properties name, label, and type.

Prerequisites

Procedure

  1. In the Cockpit, go to Connectivity and click Connector.

  2. In the Connector, click Add.

    Result: The connector settings open. You start in the General tab.

  3. Enter a meaningful Name.

  4. Assign the connector to a package of artifacts in Package.

  5. Enter a short and meaningful Description.

  6. Navigate to the Data Source tab.

  7. In Data Source, select Server Script.

  8. If you want to see a preview of the data when selecting the connector in the Adaptive Designer, activate Enable Preview. (Learn how to use that in the following How to utilize the preview section)

  9. In Setup, select the server script that specifies the selections and fields in an adaptive application.

  10. In Run, select the server script you want to create a connector for.

  11. In Start Parameters, add parameters that the server script expects, if any.

  12. Navigate to the Documentation tab and enter information about the connector and server script.

  13. Click Save.

Results

  • Your connector is saved with the current settings. Connector adds an ID to your connector and saves change dates.

  • Connector adds the Field Catalog tab that shows the properties imported from the server script.

  • Your connector is now available when creating an application.

How to utilize the preview

  1. Go to Connector.

  2. Select an API connector from the list.

  3. Toggle to edit mode.

  4. Switch to DATA SOURCE mode.

  5. Tick on Enable preview option.

  6. Save it.

  7. Go to Adaptive Designer.

  8. Click the New button.

  9. Click on the Connector field to show the list of connectors.

  10. Find the connector and click on the preview icon.

Override Field Catalog

By selecting the toggle Override Field Catalog you can adjust the returned field catalog from a server script or a table type connector. This is useful for hiding fields and editing the field catalog.

connectors override field cataog usage

Fields can be moved between Input/Both/Output by dragging and dropping or by clicking the glasses button and changing the Usage property.

Inside this view, you can also change the name and description that will appear in the Adaptive Designer, as well as the field type.

connector in api chaingproperties

You can also add new fields to the field catalog, these will take values from the chosen Original Field. This is useful for when you need the same field to be displayed in multiple places, common cases being where you need to format the same data in two different ways. This is necessary because the Adaptive Designer can only add one instance of a field catalog field to a given Input/Output section.

By deleting a field here, it will not be usable in the Adaptive Designer, and it will not be returned when the connector is called. This is useful for sensitive data.

By clicking the toggle button again, you can reset the field catalog to its original state.