Clear all filters

Is there a way to implement a “clear all filters” button?

We have tables that have 15+ filters. It would be convenient to be able to clear all of them at one time.

Currently if a filter was created on a table, there’s no option to deactivate the condition on the actions menu.

As far as I know there is no simple way to accomplish this as of now , and it has been requested many times.

If your filters are based on conditions (not auto-filters) you can accomplish roughly the same

Create a new filter with select option, and options: manually, then create 1 “options”  and add as many “other condition” as needed , and each  De-activating the condition filter(s)  based on

If you need a more detailed explanation feel free to ask, I will post some screenshots

Hope it helps

Thanks for the reply. These are mostly multi-select picklists and have been created automatically.

You can create a snippet to do this. Loop through conditions that have a name are activated and deactivate.

These conditions don’t have names, because they were created with a table filter. Can I still use javascript to clear them?

Though you didn’t provide the names, they should still have names created automatically by the table filter.

They do. I tried changing the XML to include a deactivate condition using the auto created name. But it didn’t work. 

Do you have an example of javascript? I could try that.

Hmmmm … not sure what you were doing in the xml. No need to go in there.

Video tutorial how-to time.

Here’s what I used, it works! Thanks for the help.

var params = arguments[0], model = params.model, $ = skuid.$; $.each(model.conditions, function(c, condition){ if( &amp;&amp; !condition.originalValue){ model.deactivateCondition(condition); } else if ( &amp;&amp; condition.originalValue) { model.activateCondition(condition); model.setCondition(condition,condition.orignalValue); } });<br>

After further testing, the above javascript was not updating originally inactive filters to inactive, so I adjusted the javascript, and appears to be working correctly:

var params = arguments[0], model = params.model, $ = skuid.$; $.each(model.conditions, function(c, condition){ if( &amp;&amp; condition.originalInactive === true){ model.deactivateCondition(condition); } else if ( &amp;&amp; condition.originalInactive === false) { model.activateCondition(condition); } });<br>