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:
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?
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?
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.