turtleData123
09-18-2024Cloud Apps
Front-End Running Sum using Filtered Measure - Background Filters help
Hey all, Recently we created a widget using the Filtered Measure plugin (found here) and applied the steps found on this post to create a running sum on a column widget. This works very well but fo...
- 09-18-2024
For anyone looking for a solution - I found a way to bypass background filters on a dashboard by turning off the filter item and hiding it from view:
dashboard.on('widgetready', (d, args) => { list = document.getElementsByClassName('list-item slf-back-hov') $.each(list, function(index, element) { if(element.innerText === 'BK' || element.innerText === 'N\\A'){ $(element).css({ 'display': 'none' }) } }); items = document.getElementsByClassName('uc-ms-toprow') $.each(items, function(index, element) { if (index > 0) { $(element).css({ 'display': 'none' }) } }); });'BK' and 'N\\A' refer to the INNER TEXT of the item, as our filter shows 'N\A' to the end user, but replace those with the names of the filter items you'd like to remove and you're good to go
This also removes the 'select all' button, as when that's pressed, it will select all filter items without a way to turn the hidden ones off.