UI Builder JSON Objects within chrome_toolbar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I'm trying to show/hide icons on the Workspace LHS toolbar based on some conditions (not roles) but cannot find any documentation on what objects are available. I have seen the following "condition" object
"condition":{ "tableDescription":{ "table":"x_g_jhu_transport_request", "canCreate":true } }
but what else is available to me within this condition? What if I wanted to display the icon if e.g. the user's department's type is internal (sys_user -> cmn_department -> type), or if the user's business unit head is a Level2 (sys_user -> business_unit -> head of business unit -> rank)?
Is there a way of querying a table's field value, or calling an external / client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @gwen
You’ve stumbled on one of the trickier parts of Workspace Experience / Unified Navigation in ServiceNow:
the JSON-based LHS toolbar config (app-shell, lhs_navigation, etc.) supports conditions, but it’s not very well-documented what you can reference.
Here’s the breakdown:
1. What the "condition" object actually supports
-
The condition object is really just a wrapper for the Platform Access Control checks (ACLs, table permissions, CRUD).
-
That’s why in the example you found:
"condition": { "tableDescription": { "table": "x_g_jhu_transport_request", "canCreate": true } }it evaluates whether the logged-in user can create records on that table.
-
Other supported flags are:
-
canRead
-
canUpdate
-
canDelete
-
-
You can combine multiple checks (logical AND) in the same condition.
But these are not dynamic user-field checks (like department type or BU head rank). They’re ACL-like checks.
What you cannot do directly
Out of the box, you can’t directly write something like:
That’s not supported in the schema.
3. How to achieve your “department type” or “business unit head rank” use cases
To handle these, you need to bring in a derived boolean field or a user criterion:
Option A: User Criteria (Recommended)
-
Define a User Criteria record (e.g., "Internal Dept Users").
-
Build conditions using related tables (sys_user.department.type = internal, etc.).
-
Reference the User Criteria in the App Shell / LHS nav item visibility instead of raw condition.
Option B: Scripted Condition / Derived User Field
-
Add a derived field (like u_is_internal_user on sys_user) using a Business Rule/Script Include.
-
Then configure your condition to check a table CRUD permission against a “dummy” table or use a UI Builder visibility condition that references that field.
Option C: UI Builder Rule Evaluation (if using Workspace in UI Builder)
-
In the Experience > LHS Navigation config inside UI Builder, you can add a visibility rule that calls a Data Resource (server-side GlideRecord query).
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/