Mapping a data initializer callback

Data initializer callback mapping is required when you create a form which you want to populate with data from the ISV service when the user opens the form.

To map a data initializer callback

  1. Ensure you have a callback with the appropriate response payload to provide the data you require.

    Note

    For more information, see Adding a callback and Adding responses.

  2. Open the form in the UI builder.

  3. Add all the elements necessary to display the data provided by the data initializer callback.

    Note

    Elements which are to be mapped must have an ID assigned.

  4. Click the form object to display the form properties in the configuration pane.

    ../../../_images/ss-uibuilder-mapping-step1.png
  5. Select the callback from the Data initializer callback dropdown.

    ../../../_images/ss-uibuilder-mapping-step2.png
  6. Click Add mapping.
  7. Select a callback response payload data item from the left-side mapping dropdown list, and the form model element you want to map it to from the right-side mapping dropdown list.
    Repeat for all the data items you want to display in the form.

    Note

    If you make a mistake, you can change the selected items or click the delete button to delete the mapping.

    ../../../_images/ss-uibuilder-mapping-step3.png

Example

In the example, we created a callback called getusers, which had an array as the response payload, which we mapped to a table on the form to display a list of users.

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      }
    }
  }
}