cancel
Showing results for 
Search instead for 
Did you mean: 
OleksandrB
Sisense Team Member
Sisense Team Member

Hide the widget's Button from the Toolbar for Viewer User

We will be learning how to hide information/additional buttons on the widgets from the Viewer user. Also, it is possible to hide these buttons from all users. 

 

OleksandrB_2-1707942105724.png

 

For this press the 3 dots in the upper right corner of the dashboard to Edit Script:

OleksandrB_3-1707942105725.png

 

 In the new window, paste this code and press the 'Save' button in the top right corner.

 

 

dashboard.on('widgetready', function(se, ev){
 if (prism.user.roleName == 'consumer')
{
$('widget-header', element.parent()).children('widget-toolbar').css('display','none');
}
})

 

 

 If we comment on the second line, we can hide these buttons from all users.

 

 

dashboard.on('widgetready', function(se, ev){
// if (prism.user.roleName == 'consumer')
{
$('widget-header', element.parent()).children('widget-toolbar').css('display','none');
}
})

 

 

Now you know how to hide the additional/information buttons from the widgets using simple JavaScript.

 

Disclaimer: Please note, that this blog post contains one possible custom workaround solution for users with similar use cases. We cannot guarantee that the custom code solution described in this post will work in every scenario or with every Sisense software version. As such, we strongly advise users to test solutions in their own environment prior to deploying them to ensure that the solutions proffered function as desired in their environment. For the avoidance of doubt, the content of this blog post is provided to you “as-is” and without warranty of any kind, express, implied or otherwise, including without limitation any warranty of security and or fitness for a particular purpose. The workaround solution described in this post incorporates custom coding which is outside the Sisense product development environment and is therefore not covered by not covered by Sisense warranty and support services.

Version history
Last update:
‎02-26-2024 08:16 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: