Knowledge Base Article

Reset to Default Filters Button using BloX

This article will explain how to create reset to default filters button in BloX

This helps in case you want to provide this icon functionality on the dashboard and not just in the Filters panel. 

  1. Create a new custom action with the below code: 

 *Make sure you're naming the action 'Click' if you're using the attached dashfile in section 2

var dashboard = payload.widget.dashboard
dashboard.filters.update(dashboard.defaultFilters,{refresh:true})

 

 

 

  1. You can use the dashfile attached (Backtodefaultfilters.dash )

OR

Copy & Paste the below JSON code in the Editor:

{
 "style": "",
 "script": "",
 "title": "",
 "showCarousel": true,
 "body": [],
 "actions": [
 {
 "type": "Click",
 "title": "Reset Filters"
 }
 ]
}

 

Updated 02-23-2024

22 Comments

  • Am I doing something incorrectly by chance? I went through the process as described to setup the action.

    But the button doesn't seem to reset all filters in the dashboard. 

    Solved: I need to first define my default filters in the dashboard.

    Question: Will that only impact my dashboard? What if I am making a dashboard my team can use. Will the filters I setup as default be the default for all users I share the dashboard with? 

     

     

     

  • Hi HQ_Dev_Prod,

    Great question.

    When you set default filters on a dashboard, it impacts only that specific dashboard and not others. The default filters you set will be the initial filters seen by users when they first open the dashboard or when they click "Reset Filters". However, once a user has opened the dashboard, their view becomes personalized, meaning they will see their own filter settings upon subsequent visits unless they reset the filters .
    If you are sharing a dashboard with your team, the default filters you set will be the default for all users initially, but each user can modify their view. To ensure everyone sees the default filters, users can click "Reset Filters" to revert to the default settings .
    Therefore, the filters you set as default will be the default for all users you share the dashboard with initially, but each user can have their own view after interacting with the dashboard.

    I hope that helps. Please let me know if you have any more questions.