cancel
Showing results for 
Search instead for 
Did you mean: 
Community_Admin
Community Team Member
Community Team Member

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. Community_Admin_0-1634626087594.png

Community_Admin_1-1634626087829.gif
  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})

 

Community_Admin_2-1634626399819.png

 

Community_Admin_3-1634626399665.png

 

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

OR

Copy & Paste the below JSON code in the Editor:

Community_Admin_4-1634626399698.png
{
 "style": "",
 "script": "",
 "title": "",
 "showCarousel": true,
 "body": [],
 "actions": [
 {
 "type": "Click",
 "title": "Reset Filters"
 }
 ]
}

 

Rate this article:
Comments
bminehart
10 - ETL
10 - ETL

Hi @DRay -- checking this out at your suggestion. It might work, but I'm wondering whether this can be targeted at widgets (or, really, ALL widgets) with a script? I think your snippet above is targeting the Dashboard only?

Astroraf
11 - Data Pipeline
11 - Data Pipeline

Hi @DRay @Liliia_DevX,

I am using the implementation to reset my dashboard filters while also using a BloX Jump To Dashboard button to switch between multiple dashboards. My reset button is not working. has there been a change due to a version update? 

DRay
Community Team Leader
Community Team Leader

Hi @Astroraf,

We have a filter reset button coming in a future release, but in the meantime, maybe the solution offered by @rapidbisupport in this post will help. https://community.sisense.com/t5/product-feedback-forum/button-to-reset-all-widget-level-filters/idi...

Can you keep me posted?

Thank you.

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astroraf what Sisense version are you running?

Best Regards, Lily

Astroraf
11 - Data Pipeline
11 - Data Pipeline

Hi @Liliia_DevX, I am using Version: L2025.1.0.123

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astroraf Thanks. Just tested the template Backtodefaultfilters.dash from guide above on L2025.1.0.280 and it worked. Could you please provide your template based on any sample ElastiCube to review it?

Thanks!

Astroraf
11 - Data Pipeline
11 - Data Pipeline

Hi @Liliia_DevX ,

I am using the JTD BloX widget:

{
    "style": ".blox-slides button:hover{background-color:grey!important}",
    "script": "",
    "title": "",
    "titleStyle": [
        {
            "display": "none"
        }
    ],
    "showCarousel": true,
    "carouselAnimation": {
        "showButtons": false
    },
    "actions": [
        {
            "type": "JTD",
            "style": {
                "color": "#ffffff",
                "fontWeight": "550",
                "backgroundColor": "#01a793"
            },
            "title": "Audience Dash",
            "data": {
                "dashboardId": "1111111111111",
                "args": {
                    "drilledDashboardDisplayType": 3,
                    "displayDashboardsPane": false,
                    "displayFilterPane": true
                }
            }
        },
        {
            "type": "JTD",
            "style": {
                "color": "#ffffff",
                "fontWeight": "550",
                "backgroundColor": "#01a793"
            },
            "title": "Comp Dashboard",
            "data": {
                "dashboardId": "912111111111",
                "args": {
                    "drilledDashboardDisplayType": 3,
                    "displayDashboardsPane": false,
                    "displayFilterPane": true
                }
            }
        },
        {
            "type": "JTD",
            "style": {
                "color": "#ffffff",
                "fontWeight": "550",
                "backgroundColor": "#01a793"
            },
            "title": "Custom Profile",
            "data": {
                "dashboardId": "67565656565656655",
                "args": {
                    "drilledDashboardDisplayType": 3,
                    "displayDashboardsPane": false,
                    "displayFilterPane": true
                }
            }
        },
        {
            "type": "JTD",
            "style": {
                "color": "#ffffff",
                "fontWeight": "550",
                "backgroundColor": "#01a793"
            },
            "title": "Service",
            "data": {
                "dashboardId": "655555555555555",
                "args": {
                    "drilledDashboardDisplayType": 3,
                    "displayDashboardsPane": false,
                    "displayFilterPane": true
                }
            }
        }
    ]
}

 Then I have a reset filter as:

{
    "style": "",
    "script": "",
    "title": "",
    "titleStyle": [
        {
            "display": "none"
        }
    ],
    "showCarousel": true,
    "body": [],
    "actions": [
        {
            "type": "Click",
            "style": {
                "color": "#ffffff",
                "fontWeight": "550",
                "backgroundColor": "#01a793"
            },
            "title": "Reset Filters"
        }
    ]
}

 

But for some reason the reset button does not like my code I guess. 

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astroraf hi! Thanks for sharing your example code. As I checked it from my side, these are Blox buttons to open JTD, right? How do you expect the :Reset Filters" button to affect this widget? Please provide more details on your use-case to provide you with correct suggestions. Screenshot 2025-02-14 at 15.54.57.pngThanks!

Astroraf
11 - Data Pipeline
11 - Data Pipeline

Hi @Liliia_DevX,

So the filters that I select on the filter dashboard from dashboard to dashboard using the JTD BloX, then, if I decide to reset the filters on one of the dashboards, it affects the other dashboards in the JTD BloX widget. So Say I filter on Years, Income, and Profit in Audience Dash, then the filters transfer to Comp, Custom, and Service. Which they already do, so then say I am on Comp and Custom Dash, and I click reset filters, then all the filters are reset. 

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astroraf If I understand you correctly, you should be able to use "resetDashFilterAfterJTD: true" to reset filters on your JTD dashboards after jumping to them. Please refer to this guide for more details: Exploring the Potential of Sisense Jump to Dashboard Filter.

However, the solution described in this guide is designed to work within a single dashboard and does not impact the filters of other dashboards, I'm afraid. 

Best Regards, Lily

Astroraf
11 - Data Pipeline
11 - Data Pipeline

@Liliia_DevX is there any solution to make this work with JTD?

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astroraf Please check if Sticky Filters could help to synchronize the filters across all JTD dashboards. Alternatively, using "resetDashFilterAfterJTD: true" in JTD should reset all filters to their default state each time. Additionally, you could have a button on the parent dashboard to reset only the filters of this specific dashboard. 

Best Regards, Lily

bminehart
10 - ETL
10 - ETL

There has been a bunch of chatter under my old 2024 question in this thread. Any chance someone knows now if what I'm asking is possible?

Our users often get into a situation where they've accidentally created disparate sets of widget-level filters and I'd like a button that will reset all of the widget-level filters back to the default (i.e., inherit all fo the filters from the dashboard and remove all widget-level filters).

Any bright ideas?

Liliia_DevX
Sisense Team Member
Sisense Team Member

@bminehart  hi! Please review the solution provided by @rapidbisupport  in this thread: https://community.sisense.com/t5/product-feedback-forum/button-to-reset-all-widget-level-filters/idi....

It looks like what you're looking for 😊

Best Regards, Lily

Astroraf
11 - Data Pipeline
11 - Data Pipeline

Hi @Liliia_DevX,

I tried to implement this solution, but it did not work. 😞 

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astrorafplease describe the solutions you've tried and how you configured them. We'll check if everything is set up correctly or if we have any other suggestions.

Regards, Lily

Astroraf
11 - Data Pipeline
11 - Data Pipeline

So I am using the BloX JTD script that I shared, and I tried this solution https://community.sisense.com/t5/product-feedback-forum/button-to-reset-all-widget-level-filters/idi... and I also have this solution, in which I added the Click action button. 

 

{
    "style": "",
    "script": "",
    "title": "",
    "titleStyle": [
        {
            "display": "none"
        }
    ],
    "showCarousel": true,
    "body": [],
    "actions": [
        {
            "type": "Click",
            "style": {
                "color": "#ffffff",
                "fontWeight": "550",
                "backgroundColor": "#01a793"
            },
            "title": "Reset Filters"
        }
    ]
}

 

 When I tried both these methods, the button did not reset the filters. The JTD is at the top, the reset filter is below, all my filters are the exact same across the dashboards, so that the filters pass to each dashboard. Screenshot 2025-02-18 at 16.42.50.png

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astrorafthanks for additional details. Regarding the reset button, since it only affects the current dashboard and not the drill dashboards, you might want to experiment with JTD filter configurations to manage filter behavior across dashboards.

In the Blox widget you should the JTD config. Have you tried adding "resetDashFilterAfterJTD: true"? This setting might help reset filters after jumping to the dashboard.

You can explore different JTD filter configurations to fine-tune filter behavior in drill dashboards. Check out this resource for more details: https://community.sisense.com/t5/knowledge-base/exploring-the-potential-of-sisense-jump-to-dashboard...

Best Regards, Lily

Astroraf
11 - Data Pipeline
11 - Data Pipeline

Hi @Liliia_DevX,

The only thing with this is I don't want to the filters to reset every time I JTD. I want them to stay in place, and then when I choose to reset the filters, I have a button for that. I will look into other solutions and see what I can do. Thanks again. 

Liliia_DevX
Sisense Team Member
Sisense Team Member

@Astrorafunderstood. I'm not aware of such a solution, I'm afraid. If you find one, please feel free to share it. 🙏

Best Regards, Lily

Version history
Last update:
‎02-23-2024 11:54 AM
Updated by:
Contributors