Select to view content in your preferred language

Using One Datasource to Filter Another

692
2
10-30-2023 10:58 AM
JeffreyThompson2
MVP Regular Contributor
4 2 692

Before starting this group, I came up with a list of topics I wanted to cover. This is the last of the topics on that list. We will start with the using the Message Action to filter one list by the selection made in another. Then I will attempt to build a filter that will filter both layers at once. I have put this post off for last in part because I am not sure if it will work. You will see my results either way. So, let's find out.

For this demo, I have made a map with two copies of the same feature layer. One is symbolized by blue stripes and the other has orange stripes. I have a map and two list widgets for each of the two layers.

JeffreyThompson2_0-1698680296467.png

In the Blue Stripe List, I add a Message Action > Record Selection Changes > Framework > Filter Data Records. And set the Action Data to Orange Stripe and set the Trigger/Action Connection to OBJECTID on both layers. The top dropdown menu represents the trigger data (Blue Stripe) and the bottom menu is the action data (Orange Stripe).

JeffreyThompson2_1-1698680701038.png

Selecting a Blue Stripe park will filter the Orange Stripe parks.

JeffreyThompson2_0-1698687324755.png

It seems like you should be able to extend this a little further and make a filter that filters both layers at once, but it just doesn't quite work. Sorry, I couldn't do it. The limitation here appears to be that widgets in Experience Builder are not allowed to chain react. Widget A can make widget B do something, but widget B will not pass it along to widget C. I would love to be proven wrong if anyone can figure this out and I will revisit this topic should Experience Builder add the capacity to filter two layers at once.

Edit: Here is an article by ESRI that shows a method for using the search bar to filter two layers at once. 

https://www.esri.com/arcgis-blog/products/experience-builder/mapping/filter-multiple-layers/

Edit: As of February 2024, Group Filters now exist in ArcGIS Online. 

2 Comments
About the Author
A frequently confused rock-hound that writes ugly, but usually functional code.