Forum Discussion
harikm007
08-12-2022Data Warehouse
Since we added below line of code, it should filter to only 'Date' filter.
filter = se.filters.$$items.find(el=>el.jaql.title == 'Date')
Are you using same script as above? If possible, can you share the script you are using, so that I can try to replicate the issue.
-Hari
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)
});- harikm00708-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