HOW TO

Dynamically display feature attribute statistics based on the map extent in ArcGIS Experience Builder

Last Published: January 23, 2024

Summary

In ArcGIS Experience Builder, the statistics of feature attributes can be calculated and dynamically displayed in the web app based on the map extent. This can be useful for summing or counting attribute values based on the visible features on the screen within different zoom levels.

The workflow describes how to dynamically display feature attribute statistics based on the map extent in ArcGIS Experience Builder. In this example, the total sum of bird sightings is displayed based on the visible bird sighting points on the map.

Procedure

  1. Open the web app in ArcGIS Experience Builder.
  2. Add the Map widget to the web app and select a web map as the data source. In this example, the Sydney Bird Sightings map is selected.
Selecting the web map to be displayed in the Map widget
  1. Add the 'Extent changes' trigger to the Map widget to filter data records shown in the web app based on the map extent.
    1. On the Action tab of the Map widget, click Add a trigger.
    2. In the Select a trigger pane, click Extent changes > Framework > Filter data records.
    3. In the Action settings pane, click Select data and select the feature layer from the web map. In this example, the Sydney Bird Sightings layer is selected.
Adding the Event changes trigger to the Map widget to filter data records

Selecting the feature layer in the Action settings pane
  1. Add the Text widget with the ‘Connect to data’ setting to display data from the features on the map.
    1. Add the Text widget to the web app.
    2. On the Content tab of the Text widget, toggle on Connect to data and click Select data.
    3. In the Select data pane, select the feature layer from the web map. In this example, the Bird Sightings layer is selected.
Configuring the Text widget to display text from the connected data
  1. In the Text widget on the canvas, click Dynamic content The Dynamic content icon.
The Dynamic content icon in the Text widget
  1. In the Dynamic content window, on the Statistics tab, configure the following parameters:
    1. For Operator, select the function to be operated on the field containing the attribute values. In this example, SUM is selected.
    2. For Field, select the field containing the attribute values to be calculated and click Insert. In this example, the Total Count field is to be summed and displayed in the widget.
Configuring the parameters on the Statistics tab in the Dynamic content window
Note:
Alternatively, build the same expression to sum the attribute values of the field using the Fields and Functions sub-tabs of the Expression tab in the Dynamic content pane, and click Insert.
Building the expression to sum attribute values on the Expression tab in the Dynamic content window
  1. Save, preview and publish the web app.

The map below shows the Text widget displaying the total bird sightings based on the visible bird sighting points on the map.

The Text widget dynamically displaying the sum of the feature attribute values based on the map extent

Article ID: 000031816

Software:
  • ArcGIS Experience Builder

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options