Forum Discussion
SiftHealthcare
10-03-2023Cloud Apps
Hello, I am wondering if there is a way to apply this globally or only for viewers.
Thanks!
AssafHanina
10-30-2023Sisense Employee
hey SiftHealthcare ,
the request is to run the script based on UserRole.
the user role of each user can be achieved with Prism global variable.
the following dashboard script, hide the tooltip only for Consumers(viewers) type of users, but more type of users can be added into role_name variable.
dashboard.on('widgetready', function(dash) {
const role_name = ['consumer']; /* define the rolenames to exclude*/
if (role_name.includes(prism.user.roleName)) {
const filterElement = $('.ew-i-caption');
filterElement.off('mouseenter');
}
});