Select data

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).

Manage data

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. Use the Search box to filter the list to help you find a particular data source. Search results include sublayers for the web maps and web scenes you've added to the app.

Add data to the app

When adding data to your app, you can select web maps, web scenes, and layers stored as content items in ArcGIS, including the following:

You can browse and search for these data sources in your content, your groups, your organization, and content that’s shared publicly, including ArcGIS Living Atlas of the World. Layers from feature, scene, or map service URLs are also supported. In addition, when you add web maps and web scenes to your app, you can use their supported layers as a data source for widgets.

Note:

  • When you add a web map or web scene as a data source, widgets can connect to its supported layers, such as tables, map image layers, tile layers, and group layers. Unsupported layer types aren't available in widget settings and don't appear on the details tab of the Data panel.
  • Web maps and web scenes created with JSAPI 3.x that cannot be opened in Map Viewer Classic 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 an error 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.
Note:

You can choose to hide some sublayers in a service, a group layer, or a web map or web scene when you add data. Or you can hide them under the detail panel of the service, group, web map, or web scene. The hidden layers won’t be available in the select data list when you configure widgets. You can only hide layers that aren't used yet.

Remove data

You can remove a data source using the Remove option on item cards in the Data panel. The data contained within the data source will be removed as well. 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.

Data details and data views

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, web scenes, services, and group layers, you can view the following details:
    • Layers tab—Layers that the data source contains. 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. You can hide an unused layer so it won’t appear in the select data list when you configure a widget. Click the layer card to open a details pane.
    • Widgets tab—Widgets that use the entire map, scene, service, or group layer directly. Widgets that only use specified layers under the data aren’t listed here; they’re listed under the corresponding layer instead.
  • For single layers (including those without sublayers), you have the following setting options and details:
    • Data settings—Set filters, sort fields, and record limitations for the data. The filter settings here affect all its data views.
    • Refresh settings—If the Auto refresh option is turned off, the data will be refreshed only when you refresh the app or the builder. Turn on Auto refresh to allow refreshing the data and getting the latest features based on a certain time interval. You can set a custom time interval, or if the data comes from a web map, you can choose to honor the layer’s settings.
    • Allow export—Provide options for users to export data at runtime from connected widgets for which data actions are enabled. (Export is limited to 5,000 records.)
      Note:

      For hosted feature layers, the app will also verify that the end user's role and item settings allow exporting the data.

    • Data views tab—Create data views of supported feature layers and scene layers by adding filters, sort fields, and records limitations to control what appears in connected widgets. These settings only take effect within the view and won’t affect other data views or the source data.
      Note:

      Each layer also has built-in views that you can select when configuring data sources for the widget. Default view contains all the features. Selected features view contains features selected at runtime. Auto-populated view is used for dynamic content settings with List widgets.

      • View for empty selection—Check this box and click its Settings button to configure a view that displays when there are no features selected in a Selected features view. (Features in this configured view won't be selected automatically.)
    • Fields tab—Fields used by widgets.
    • Widgets tab—Widgets that use the layer in their settings.

Use data

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, filters on the default data view affect all widgets that use the data or its views. Filters on a specific data view only affect widgets that use the same data view.

Note:

When displaying a web map or web scene in a Map widget, a new web map or web scene view is created automatically, and this view is only used in the current widget. Thus, data processing within the Map widget won't affect widgets using the same data source or its contained layers. But the Map is affected by data processing on the default view.

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 added data and output data in the app that the widgets support (hidden data is not listed). You can select data from the list or add more data to the app. Use the Search box to filter the list of options. Search results include sublayers for the web maps and web scenes you've added 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 and the supported data types for each.

WidgetSupported data type*Supported data number

Branch Version Management

Feature service, map service (must be registered as versioned)

1 or multiple

Button**

Feature layer, scene layer

0 or 1

Chart

Feature layer, scene layer

1

Edit

Feature layer, scene layer (layers must be editable)

1 or multiple

Embed**

Feature layer, scene layer

0 or 1

Feature Info

Feature layer, scene layer

1

Filter

Feature layer, scene layer

1 for each filter

Image**

Feature layer, scene layer

0 or 1

List

Feature layer, scene layer

1

Map

Web map, web scene

1 or 2

Map layers

Web map, web scene

0 or 1

Query

Feature layer, scene layer

1 for each query

Search

Feature layer, scene layer

1 for each layer source

Table

Feature layer, scene layer

1 for each sheet

Text**

Feature layer, scene layer

0 or multiple

*For a specific list of supported item types, see Add data to the app.

**Image, Text, Button, and Embed 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. For more information, see Dynamic content.

Output data

In addition to the data that you manually add to the app, the following widgets can process the original data and generate a new output dataset with the displayed results.

Source widgetOutput data typeOutput dataset

Chart

Feature layer

1

Directions

Feature layer

1 for stops, direction points, direction lines, and route

Query

Feature layer

1 for each query

Search

Feature layer

1 for each locator source

When these source widgets are configured in the app, their output data is listed in the Select data pane when configuring other widgets. The output is created as a new data source, so filters and selections on the output data won’t affect the original data source.

Note:

If you remove a widget for which output data is being used by another widget, you'll get a warning message with a list of the related widgets. You can select the related widgets to delete as well, or keep them to reconfigure with another data source later.

The schema of the output data is defined by its source widget.

  • Chart—A statistic with attributes of the category field (if configured) and calculation results of number fields (it doesn't contain geometry)
  • Query—A subset of records that meet the query criteria, with the fields as configured in its Results settings
  • Search—The address for the search result as found in the corresponding locator source

The actual records in the output data are generated dynamically by the source widget at runtime.

Data source views

Once the data is selected in the widget settings, you can choose one or more views in the drop-down list, based on how many data sources the widget supports. A data source has four types of views:

  • Default is a built-in view containing all the features in the data.
  • Selected features is a built-in view containing features selected by the user at runtime. The selected state of a feature is synchronized through all views. This view can be used to display an interaction result. For example, if it's configured for a List widget, the list only displays the selected records, and items in the list change dynamically as the selection changes. If there is no selection, the list displays a No data message until records are selected. Or you can create a view for empty selection on the Data panel.
  • Auto-populated is a built-in view that's available in dynamic content settings if a widget is added into a List widget and is connected to the same data view. This view only contains one feature that the list generates for each item in it.
  • Data view is a subset of features that you can create with different filters, sort fields, and records limitations. You can preprocess a data source with multiple data views to control what data appears in a widget without affecting other data views or the source data.
    Note:

    Output data doesn’t support adding custom data views.

    Note:

    The Page size setting on the Records tab is used for query performance and efficiency. It won't affect the total number of result features in widgets that support pagination. If the page size is smaller than the actual result, multiple requests will be sent until all results are loaded.

The Default view is selected by default. You can also edit an existing view or choose to create another view for the widget. Views created from a widget configuration panel are also available to select in other widget settings.

Dynamic content

Several widgets have settings for which you can use or display dynamic information from a connected data source. Examples include an attribute value of a specified feature; a statistic result of features meeting certain conditions; or an expression mixed with static strings, dynamic values, and computations.

Attribute

Get the attribute value of a feature in the specified data view using one of the following views:

  • The views you set in the widget’s data source setting.
  • The Selected features view of the original data layer. This view allows you to display the interaction results such as displaying the selected feature’s attributes.
  • The Auto-populated view if the widget is within a List widget (such as text, image, or button) and has the same data view as the List. This view contains only one feature that the list item represents.

If the view you choose contains multiple features, the attribute value of the first feature is returned (based on the sort settings in the data view).

Statistics

Get the statistics results of the feature set defined by the specified data view.

Results could be the maximum, minimum, average, or sum value of a numeric field; the feature count of the feature set (using the unique ID field); or if the service supports distinct count, the number of unique values for a field.

Expression

The expression editor allows you to input text (format: “text”); numbers; field variables (format: {fieldname}); and functions including AVERAGE({fieldname}), COUNT({fieldname}), SUM({fieldname}), MAX({fieldname}), and MIN({fieldname}). Each part is concatenated with a plus sign (+). The expression returns the result of string concatenation and number calculation. For example, if you input 1+1, it returns 2 (number), but if you input 1 + “1”, it returns “11” (string).

As you type, suggestions appear that you can click to insert. Also, you can insert a field variable or a function by clicking the field names or function names listed under the input box.

Data under the Fields tab allows you to set which data view the field variable represents. If a field variable is added as an independent part in the expression, the attribute value for that field is returned from the first feature in the specified data view.

If a numeric field variable is used within a function—for example, AVG({fieldname})—the function returns the statistic result of the data view for that field.

You can format numbers in the expression by clicking the gear icon Number formatting and turning on Number formatting. You can choose how many decimal places to show, include a thousand separator, and add a unit from the data.