Data is at the core of most apps you create with Experience Builder. Many widgets are data-driven, and the builder provides unified data management. Widgets consuming the same data can be connected in your app. For example, you can synchronize record selections across multiple widgets and apply the same filter across widgets that are connected to the same data.
When you add data to an app in Experience Builder, it’s a specific instance of a data source connection. The benefits of this include the following:
- Updates to the original data source are synchronized in the apps you build.
- You can add the same data source multiple times. The connections become independent data in Experience Builder. Most of the data processing doesn’t affect other data processing (such as filtering and sorting), with the exception of updates that are made to the original data source (such as editing features and updating attributes).
All the data you add to the app is listed in the Data panel of the builder workspace. You can manage the app’s data here and review related information, such as how many and which widgets are connected to the data and to which fields, when applicable.
Add data to the app
When adding data to your app, you can select web maps, web scenes, and feature layers stored as content items in ArcGIS (hosted feature layers). You can browse and search for these data sources in your content, your organization, and content that’s shared publicly. Feature layers from service URLs are also supported. In addition, when you add web maps and web scenes to your app, you can use their supported feature layers as a data source for widgets.
- Currently, when you add a web map or web scene as a data source, widgets can only connect to its feature layers (excluding feature collections). Other types of layers aren't available in widget settings and don't appear in the details tab of the Data panel.
- Web maps and web scenes created with JSAPI 3.x that cannot be opened in Map Viewer or Scene Viewer cannot be used as data sources. (If you add one of these items, it won’t be available to select and appears in the Data panel as a disabled card.)
You can add data to an app in two ways:
- Before adding any widgets, click the Add data button in the Data panel to add data that will be used in the app. All data types supported in Experience Builder are listed in the Add data window.
- If you don’t add data before adding widgets, you can also add data when configuring a widget by clicking Add data at the bottom of the Select data pane. Only the data type supported by the widget is available to add. The data you add when configuring a widget also appears in the Data panel and is available to select when configuring other widgets.
You can remove a data source using the Remove option on item cards in the Data panel. When you remove data here, it is no longer available for widget configuration. If you remove data that’s already used by widgets, the app will no longer display information from that data, and all widgets connected to that data will be affected. You can delete the affected widgets when you delete the data, or you can reconfigure the widget settings by connecting other data later.
The Data panel displays item cards with the item names for data that you add to the app. Labels with icons help you differentiate between data types. You can view additional details by clicking the link to open the item page for the original data source. You can change the name that appears on the item cards to something more relevant to your app (the source data is unchanged). Each card indicates the number of related widgets and layers in a map or scene. Clicking a data card opens a pane with more data details.
- For web maps and web scenes, you can view the following details:
- Layers tab—Feature layers referenced by the map or scene. The layers are divided into two groups: In use shows layers that are selected in widget settings, and Others shows layers not yet connected to a widget. Click the layer card to open a details pane.
- Widgets tab—Widgets that use the entire map or scene. Widgets that don't use all the layers aren’t listed here; they’re listed under the corresponding layer instead.
- For layers, you can view the following details:
- Fields tab—Fields used by widgets.
- Widgets tab—Widgets that use the layer in their settings.
Any data you add to an app, regardless of how you add it, is available to all supported widgets in that app. A data source used by one widget can be used by others. Record selection is synchronized throughout the app. In addition, data processing at the app level, such as filters from Filter widgets and actions set on the framework, affects all widgets that consume the data. Some data processing impact is also limited to just a widget, even if it shares a data source with other widgets. For example, the filters you set on a List widget (both the data filter you configure and the end-user filter tool) will not affect the features displayed in a Map widget that uses the same data.
The configuration panel for each widget includes a standard setting to connect to data. When you click Select data, a pane appears that lists the data in the app that the widgets support. You can select data from the list or add more data to the app. Some widgets support multiple data sources, so you can select more than one item in the list. If a widget can only be connected to one data source, click the existing data card to open the Select data pane where you can clear the selection and select another item.
The table below lists the widgets that you can connect to data, the supported data types for each, and whether the corresponding data processing affects the widget (local) only or the entire app (global).
The effect range column doesn’t account for configured actions.
|Supported data type
|Supported data number
Web map, web scene
1 or 2
0 or 1
0 or multiple
0 or 1
0 or 1
Web map, web scene
0 or 1
1 for each filter
*Image, Text, and Button widgets are static by default. To display information from the data, turn on the Connect to data setting and specify the parameters with attributes, statistics, or expressions.