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
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.
Open the form in the UI builder.
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.
Click the form object to display the form properties in the configuration pane.
Select the callback from the Data initializer callback dropdown.
- Click Add mapping.
- 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 button to delete the mapping.
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"
}
}
}
}
}
}