Here is a script to hide one or widgets from a dashboard.
(Its possible to modify the script so that a widget can be hide/unhide based on some condition or value selected in a filter)
Steps:
Add below script to dashboard
Update the variable 'widgetList' with list of widget to hide
Save the script and refresh dashboard
dashboard.on('widgetrefreshed', function (se, ev) {
widgetList = ['625e34a5aer456002ea7b64d', '6789cdc6fa34563002er56456']
if(widgetList.includes(ev.widget.oid))
{
$(`widget[widgetid="${ev.widget.oid}"]`).closest('.dashboard-layout-subcell-host').addClass('dontshowme-parent')
}
});
Hi,
What would the code look like to add in logic to hide a widget based on a group?