Restrict Tab Based on user location on Dashboard SOW Servicenow

dhivyal94299399
Tera Contributor

I want to hide the tab of the dashboard based on the user location

The overview is a dashboard, how to restrict it based on user location

dhivyal94299399_0-1781244038497.png

 

5 REPLIES 5

Tanushree Maiti
Tera Patron

Hi @dhivyal94299399 

 

1) Either Create different dashboards with different permission

  • Create a primary dashboard that includes the location-restricted tab.
  • Create a second dashboard that excludes the location-restricted tab.
  • Use the Sharing panel on the dashboard to grant access only to authorized users, groups, or roles

OR

 

2)If certain roles are tied to location restrictions, you can make the dashboard visible only to users in those roles.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hi @Tanushree Maiti 

I want to use the single dashboard and restrict the tab based on user location

pr8172510
Kilo Sage

Hi @dhivyal94299399,

Use UI Builder visibility conditions:

  1. Go to:

    Now Experience Framework > UI Builder
  2. Open  Service Operations Workspace .
  3. Locate the navigation item/page for Overview.
  4. Configure a Visibility Condition on the tab/navigation item.
  5. Check the logged-in user's location (sys_user.location) through:
    • Client Script
    • Data Resource
    • User criteria logic
  6. Show or hide the tab based on the location value.


if (user.location == '<Location Sys ID>') {
    return true;  // Show tab
}
return false;     // Hide tab

 

Since Workspace navigation supports role-based visibility, many customers map:

Location → Group → Role

and then use the role in the navigation item's visibility settings.

Ankur Bawiskar
Tera Patron

@dhivyal94299399 

Not possible to hide a particular tab within Dashboard

Only solution -> keep separate dashboard and add only required tab in it.

Control the dashboards visibility based on role

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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