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

Selectively Hide Widget Toolbar Buttons

The widget script below shows a list of buttons that are on a widget toolbar and how to hide each of them, so you can choose which ones you want to hide for any particular widget.

Note that if you hide the Edit button, as the owner of the dashboard, the only way for you to open and edit the widget is to have the direct URL to the widget. If you want to hide the button(s) only for viewers (so you can still see all the buttons as the owner/designer), uncomment the code that checks the user's role (see comments on the code).



/** This is the widget script to selectively hide widget toolbar buttons **/

//Hide widget toolbar options
widget.on('buildquery', ()=> {

	//Uncomment the code below if you want to hide the buttons only for viewers
	//if(prism.user.roleName == 'consumer') {

	//Hide Edit (pencil) button
	//Hide Expand / Full Screen (diagonal double-headed arrow) button

	//Hide Detail (circled i) button

	//Hide Menu (vertical ellipsis) button

	//Hide Analyze It (graduation owl) button

	//Uncomment the closing curly bracket below if you want to hide the buttons only for viewers




Version history
Last update:
‎12-12-2023 09:58 AM
Updated by:
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: