Select to view content in your preferred language

Filter map layer and related tables

1933
8
Jump to solution
08-04-2025 01:30 PM
Labels (1)
JustinWolff
Frequent Contributor

We have a hosted feature layer in AGO containing one (1) polygon feature class, and three (3) tables with multiple relationships:

Tracts (Polygon) -> 1:Many -> Tract Notes (Table), relationship fields OBJECTID -> TractGUID

Project (Table) -> 1:Many -> ProjectNotes (Table), relationship fields OBJECTID -> ProjectGUID

Project (Table) -> 1:Many -> Tracts (Polygon), relationship fields OBJECTID -> ProjectGUID

So one Tract may have multiple TractNotes records, one Project may have multiple ProjectNotes records, and one Project may have multiple Tract features.

In Experience Builder, I would like to filter the Project table on the 'Project Name' field, and have it also work against the Tracts polygons in the map.  Ideall, the Edit widgets configured to add records to Tracts, TractNotes and ProjectNotes would default the ProjectGUID values in Tracts and ProjectNotes.  We are currently using a Survey widget to add polygon features, pulling geometry and some attributes from another map layer, and an Edit widget to add records to the TractNotes and ProjectNotes tables.  I'm hung up on the initial Project filter - how do I configure a Filter to work against related records?  Based on what I'm finding elsewhere in Community this may not be an option?  Thanks

 

0 Kudos
1 Solution

Accepted Solutions
Laura
by MVP Regular Contributor
MVP Regular Contributor

I ran into a similar issue. I have a layer with two related tables, and I needed to filter based on the related records. To work around it, I created joined view layers for each table so they would have a spatial reference. This allowed me to zoom to and filter the data.

In my case, I used the Query widget, but the approach should be similar. I set up actions within the framework to Filter Data Records and Select Data Records, using the view layer as the trigger and the original polygon layer as the action target. That way, it would zoom to the correct feature and display the custom popup I configured on the polygon layer.

View solution in original post

0 Kudos
8 Replies
Laura
by MVP Regular Contributor
MVP Regular Contributor

I ran into a similar issue. I have a layer with two related tables, and I needed to filter based on the related records. To work around it, I created joined view layers for each table so they would have a spatial reference. This allowed me to zoom to and filter the data.

In my case, I used the Query widget, but the approach should be similar. I set up actions within the framework to Filter Data Records and Select Data Records, using the view layer as the trigger and the original polygon layer as the action target. That way, it would zoom to the correct feature and display the custom popup I configured on the polygon layer.

0 Kudos
JustinWolff
Frequent Contributor

Thank you, Laura, I think that's the route I'm going to have to go.  

0 Kudos
apgis16
Frequent Contributor

@Laura If using a join view, how do I use that layer in the widget so it filters on the map? The map has the original hosted feature layer in it, not the join view.

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

The view layer is trigger and the original layer is the action. You need a unique ID that is the same for each to tie them together.

0 Kudos
apgis16
Frequent Contributor

I only see the option to select the trigger called "Data filtering changes" and the action be "pan to" or "zoom to" 

apgis16_0-1769633579053.png

 

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

Need to use query instead of the filter widget.

0 Kudos
HannahG
New Contributor

Did you find a good solution @apgis16 ? I have the same issue and while I cannot make it work with a filter widget, a selection widget works.

0 Kudos
mwartman_grey
Frequent Contributor

The Feb 2026 ArcGIS Online update includes a new message action for Data in the Filter Widget. This filters related records and their parent records (or vice versa) across the entire ExB app which is very helpful. 

See the section 'New message actions' in the blog post linked below:

https://www.esri.com/arcgis-blog/products/experience-builder/announcements/whats-new-in-arcgis-exper...

0 Kudos