Select to view content in your preferred language

How do I hide map data when no filter/selection is applied in ArcGIS Experience Builder?

112
3
12 hours ago
Labels (2)
IanGalway
New Member

Hello Ersi Community, I hope some of you can help me out.

 

I have two feature layers in my web map:

  • Cities — contains only a city name and an id field (works like a lookup table)

  • Libraries — contains point geometry, name, and a city_id field

Both layers are added to the same web map, which I am using as the data source in Experience Builder.

In my app, I added a Table widget showing the Cities layer.
I then set up an Action → On record selection changes → Filter data records, where selecting a city filters the Libraries layer using:

Cities.id = Libraries.city_id

This part works correctly:
When I click a city in the table, only the libraries belonging to that city appear on the map.

My problem:
When no city is selected, all libraries appear by default, and I want the opposite behavior.

Desired behavior:

  • When no city is selected → hide all library features

  • When a city is selected → show only libraries for that city

How can I configure Experience Builder so that the Libraries layer is hidden until a user selects a city?

0 Kudos
3 Replies
JeffreyThompson2
MVP Frequent Contributor
IanGalway
New Member

Thank you for the reply

Your solution works for the Filter widget, but can you apply the same functionality for say table or select widget?

 

 

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

There isn't really a way to do it within the Table or Select Widgets, but if they are using the same Datasource and Datasource View, the Table and Select Widgets should respect the filtering applied by the Filter Widget.

GIS Developer
City of Arlington, Texas
0 Kudos