Map data from an external source to a component
To map data from an external source to a component:
-
Add an element to the component, or click an existing element.
-
In the right-hand pane, in the Content section, click the attribute you want to configure for the selected element. For example, for an Image element, the attributes that can be configured with mapped data are Image source, Caption, Image alternative text, or Link.
-
Click Mapped to open the Data collection dialog.
-
In the Data collection dialog box, in the Source step, select the relevant data source from the drop-down list.
NoteIf you've previously selected a data source for this component, it is automatically selected when the dialog box appears. Click the Source icon or the Back button at the bottom of the right -hand pane if you need to select a different one.
-
In the Data collection dialog box, in the Path step, the data tree displays applicable properties that can be used as value for the attribute. Click the appropriate property for the attribute.
NoteExpert users can provide a JSONPath manually: click Expert mode to display the underlying JSONPath query that will be generated by your choice of property, and then specify the JSONPath of the object you want to map.
-
In cases when the data source has multiple records for the same object, and the Data scope > Data collection is set to Mapped, the dialog includes a third step called Items.
When setting up a repeater of the element, you can limit or specify which items of the array should be displayed:
-
Click All to repeat the element for all items in the data source collection.
-
Click Limit to repeat the element only for the first items in the collection.
-
Click Specify to specify which items in the collection to repeat, based on their position in the list.
After you do this, you can preview in the component's canvas what the repetition will look like based on the chosen data source.
-
-
Click Complete.