rholmesminton
06-10-2025Data Storage
JavaScript does not work for Tabber
I added the following JavaScript to my tabber widget. However it does not execute. I found this JavaScript in a help article on the Sisense Community website. It is designed to change the dashboard filters based on which tab is selected. Can you please tell me what I need to do make this script work? My work around was to hide the dashboard filter and disabling the dashboard filter on each widget and creating a widget level filter.
$('.listDefaultCSS .listItemDefaultCSS', element).on('click', function(s){
widget.scriptConfig = true;
filter = prism.activeDashboard.filters.$$items.find(el=>el.jaql.title == 'Checklist Type') //Title of filter
//mapping of Tab name and filter item. Here when Tab1 is selected, 'Onboarding' will get selected in Checklists Type filter
var tabFilterMapping = {
'Tab1':"Onboarding",
'Tab2':"Advancement"
}
var filterValue = tabFilterMapping[$(s)[0].currentTarget.innerHTML]
filter.jaql.filter = {
"explicit": true,
"multiSelection": false,
"members": [
filterValue
]
}
var filterOptions = {
save: true,
refresh: true,
}
prism.activeDashboard.filters.update(filter, filterOptions)
}) ;
});