How can we restrict 'Create New Dashboard' option in Platform Analytics Dashboard

Pallavi_G
Tera Expert

Hi All,

 

How can we restrict 'Create New Dashboard' option in Platform Analytics Dashboard. I tried ACLs and checked for other options but nothing is working. I have to restrict that option for a particular role.

Pallavi_G_0-1741588943951.png

Thanks in Advance

9 REPLIES 9

This is the ACL

Pallavi_G_0-1741759252734.pngPallavi_G_1-1741759306802.png

It is printing the line 7 info msg but it is not restricting.

Ankur Bawiskar
Tera Patron
Tera Patron

@Pallavi_G 

if you want to remove completely try this if it works

1) Open Platform Analytics Workspace from UI builder

2) then open component "Dashboard Library (Default)"

3) Ensure you are in correct scope

4) Check if you can hide it somehow

AnkurBawiskar_0-1741760550749.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks Ankur, But I want to restrict that option for a particular role

Greg_W
Tera Contributor

Has there been a fix identified for this issue?  We are migrating to Platform Analytics and are running into the same thing.  Great that we can stop the creation using an ACL but leaving the button there is a bad user experience.

The create button is within 2 pages, Dashboard library and dashboard page:

lallenstein_3-1757515653693.png

 

It is possible to hide the create button via the UI Builder:

Dashboard Library:

1. Go to UI Builder, select Platform Analytics Experience

2. Create a duplicate of the Dashboard Library Variant

3. In the created duplicate, Select "Dashboard overview 1" component within the content panel on the left side

4. Within the configure panel on the right side, there is a "Hide create button" option. Click here on the "bind data" option

lallenstein_1-1757515368994.png

5. Select "Use script" on the top left, use following script to allow the functionality for specific roles:

lallenstein_2-1757515423562.png

 

 

/**
* @Param {params} params
* @Param {api} params.api
* @Param {TransformApiHelpers} params.helpers
*/
function evaluateProperty({api, helpers}) {
// get roles of logged in user
let user_roles = api.context.session.user.roles;
// only visible for users with role admin or reporting_admin
return !(user_roles.includes("admin") || user_roles.includes("reporting_admin"));
}

 

 

Attention: The "hide create button" functionality will also disable the filter function and the search function on the dashboard library page. After creating a support case for this behaviour, this works as per product requirements. A workaround solution for this is to create a customized dashboard library page.

 

 

Dashboard page:

1. Create a duplicate of "Dashboards" Variant in UI Builder in Platform Analytics experience

2. Select "Dashboard 1"  component in Content panel in the left side.

3. There is a configuration option "Disable dashboard creation", use "bind data" option.

lallenstein_4-1757515743301.png

4. Use the same script as in the first approach.

 

Important: To make the duplicated pages the standard page when visiting dashboard library or dashboard page, you need to configure the order for the respective variant via Settings of the variant:

 

lallenstein_6-1757516009815.png