Forum Discussion
jplefka
08-12-2022Data Storage
Since 'm using older data in my DEV environment the latest date i have is from June so i'm hard coding it for now
dashboard.on('initialized', function (se, ev) {
currentYear = '06/01/2022'
datefilter = se.filters.$$items.find(el=>el.jaql.title == 'As Of Month')
datefilter.jaql.filter = {
"explicit": true,
"multiSelection": false,
"members": [currentYear]
}
var filterOptions = {
save: true,
refresh: true,
}
se.filters.update(datefilter, filterOptions)
});harikm007
08-12-2022Data Warehouse
This is interesting. I tried the same code and it works for me (I have 2 more dashboard filters with background filter and locked filter). Are you using any other dashboard script? Also can I ask screenshot of filter panel after executing this script?
-Hari
- jplefka08-12-2022Data Storage
No this is the only script i'm using, here is the before and after