- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 07:47 AM
I need help to hide the “Create new dashboard” button in the Platform Analytics, Dashboard Library - depending on certain roles. The button is currently visible to everyone, but I would like only selected roles to be able to create dashboards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2025 08:04 AM
Solution:
The create button is within 2 pages, Dashboard library and dashboard page:
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
5. Select "Use script" on the top left, use following script to allow the functionality for specific roles:
/**
* @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.
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2025 04:00 AM
The button cannot be hidden on the dashboard library page, rest everything worked as suggested by @l-allenstein
Upvote this idea and hope ServiceNow picks it up