When using Filter widget, the filter will apply to the same data source cross all the pages. for example, in first page, if created first filter to filter a layer (e.g., population, filter by age > 70). If in second page, created second filter with same data source, need to use whole dataset, however only filtered data available, and there is no way to clear the filtering to reset the filter.
Question: is it possible to modify existing Filter Widget to have rest option? or create a custom widget to reset the filter? Can someone provide sample to show how to create a widget to reset the filter?
If you set up multiple Views of the same data, you could use each View for different filters. And only the data shown using the same View will be filtered.
Thanks for the reply. I tried your method: created 2 views (view 1, view 2) , every view has its own filter bind to the same data. However if filter data in view 1, the filtered data still applied to view 2. I expect to see the filter in view 2 can filter on the whole data (not the filtered data from view 1).
Please advise.
Hi John, I just tried it again and it worked for me. I may not understand your setup. There are many configuration steps. In my case, I set up several views in the Data portion of the Experience Builder using the same data. I then have 3 Cards in a single row. In each Card, I added different text elements. Each text element connects to the data and a specific view through dynamic content. I then set a filter in Card 3 for all the text elements in Card 3 using the same view. If I use a different view of the data in Card 2, the data doesn't change with the filter.
I hope the following clarifies what I did.
Here's where I add data and set the view (4th icon down)
Here's where I'm configuring a text element in the card selecting the data and the selecting a view. In each case, I would only select one view.
Then in the text element, I would use the red circled dynamic content button to select the data and view and the variable
And configuring the content. If I change the data source of view, I find it best to delete the old value and add a new one.
And here is the configuration I used for the filter selecting the same data and specifying a view.
I hope this helps.
Brian
Hi Brian,
Will you share this web app? I want to learn how it works
Thanks
Hi Brian,
Looks you only use one Filter Widget. Can you try to use Filter widget in every view and bind to the same data source? In my testing, if the data filtered in view 1, then in view 2, only filtered data available, not whole data.
Here's a screenshot of two filters using two different views of the same data. In my case, the filters are acting only on the same views used in dynamic text. The value below the filter is the filter result.
I am working on a project with different exb pages for neighborhoods. I am trying to get them to all consume the same source layers with filters applied. The views trick above works great for the list widget on each page.
I am running into a problem with a map at the bottom of each page, which I would also like to be filtered by the same filter applied to the list widget. So I cannot use the addition layer views trick.
It seems I would need to create multiple maps so I can apply the same filter to both the list and the map and not run into problems when I which pages.
Is there was a easy way to clear the filter between pages. Then I could consume the same map and layer on each page.
Hi @RyanBohan - Map in ExB utilize special view(s) which is not affected by any views other than the default view. See the first Note in Use data in Document: Select data > Use data:
When displaying a web map or web scene in a Map widget, a new web map or web scene view is created automatically, and this view is only used in the current widget. Thus, data processing within the Map widget won't affect widgets using the same data source or its contained layers. But the Map is affected by data processing on the default view.
Unfortunately, there is no easy way to achieve your goal, other than the methods you mentioned above (adding multiple Map widgets). Hope it helps for your reference.
Best,
Tonghui
Hello Thonghui,
Thank you for the reply. I am correct that not only would I need multiple map widgets. I would have to duplicate the map itself?
On the application we are building out. I could see using the same source data on 10 different pages. With out a way to automatically clear the filter between pages, it would be duplicating the source map 10 times. Which would make something simple like updating the pop-up, a rather long process because it would need to be done on each map.
If I could add something to the filter widget to clear previous filters this would not be necessary.