custom Filter widget to reset filter

01-18-2021 07:44 AM
New Contributor II

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?

13 Replies
Esri Regular Contributor

@RyanBohan from the design perspective, you could configure the popup and save the layer as an item to the content. In this way, when you create a map and add the layer item in. any changes on popup will be saved to the layer item and picked up by all the maps that use the same layer item. As we talked about before, it would be nice to break down one big data layer to a few if each map is aiming at one category for performance purpose.

Esri Contributor

@RyanBohan - well, another possible solution is to add the same map that you prepare into the data source panel multiple times, and they will be treated as different data sources in Experience Builder. After that, you could use them separately for different pages.


For the "clear previous filters", it could be something we consider as an enhancement in the future. Just to clarify, your purpose is to turn off filters, not to clear the input values when the ask-for-values option is turned on, correct? Those are two cases where the purposes are slightly different.

Occasional Contributor

Jianxia I agree filtering the data down to smaller sets would be ideal.  Once our project gets more stable I will apply definition filters to get smaller data sets.

Thank you Tonghui!  I did not realize I could add the same map multiple times as a data source.  I tested quickly and this will allow me to give the desired functionality.  And keep maintenance easy once we go into user testing.

Thank you Exb Team!

Esri Regular Contributor

@TonghuiMing Could you help this?