HOW TO

Filter widget records based on the criteria of a previous filter in ArcGIS Experience Builder

Last Published: May 13, 2024

Summary

In ArcGIS Experience Builder, the Filter widget limits the visibility of features in one or more layers to only those that meet the expression criteria. Multiple filters can be configured in a single Filter widget to control the features displayed in other widgets, such as the Table widget.

This article provides the workflow to filter records listed in the Filter widget based on the selected criteria of a previous filter in ArcGIS Experience Builder. In this example, the Table widget displays records of earthquake occurrences, as shown in the image below.

A Table widget in a web app displaying earthquake occurences

A Filter widget with two SQL clauses is added to narrow down records displayed in the table. The first filter lists records with different earthquake magnitudes, while the second filter lists the shake intensity values available based on the selected magnitude of the first filter.

Procedure

  1. Open the web app in ArcGIS Experience Builder.
  2. Add the Filter widget to the web app.
  3. Create a clause set to list records of data in the Filter widget.
    1. On the Content tab of the Filter widget, click New filter.
    2. In the Create new filter panel, click Select data and select a feature layer. In this example, 'Shake Intensity' is selected.
    3. Under SQL Expression, click SQL Expression Builder.
    4. In the SQL Expression Builder window, click Add clause set.
Adding a clause set in the SQL Expression Builder window
  1. Configure the first clause to list records from the field.
    1. In the first clause, for the Field input box, select a field. In this example, 'Magnitude' is selected.
    2. For the Operator input box, select a functional operator. In this example, the is operator is selected.
    3. Click Select source type The Select source type icon and select Unique.
    4. Click More input settings The More input settings icon > Ask for values. This enables records from the selected field to be displayed in a list.
The Ask for values setting in the first clause
  1. Configure the second clause to list the records based on the selected criteria of the first filter.
    1. In the second clause, for the Field input box, select a field. In this example, 'Intensity Value' is selected.
    2. For the Operator input box, select a functional operator. In this example, the is operator is selected.
    3. Click Select source type The Select source type icon and select Unique.
    4. Click More input settings The More input settings icon > Ask for values.
    5. In the List values based on drop-down list, select Values filtered by previous expressions.
The Values filtered by previous expressions option in the List values based on drop down menu
  1. Click OK to close the SQL Expression Builder window.
  2. Save, preview, and publish the web app.

The Filter widget image below shows the second filter with a list of available shake intensity values based on the selected earthquake magnitude of the first filter.

The Filter widget with two filters added to the web app. The second filter lists intensity values based on the selected magnitude in the first filter

Article ID: 000032560

Software:
  • ArcGIS Online
  • Portal for ArcGIS
  • ArcGIS Enterprise 11 0
  • ArcGIS Enterprise 11 1
  • ArcGIS Enterprise 11 3
  • ArcGIS Enterprise 11 2

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