How to Maintain visibility conditions for component in ui builder servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2026 01:26 AM
Hi All,
I have created a component on a Landing Page/Dashboard in UI Builder. The dashboard itself is visible to users belonging to 6 different groups, but there is a requirement that component should be visible only to 3 groups.
While configuring the component, I can see the Hide Component option with values True, False, and None. I tried using a script-based visibility condition, but it is not working as expected.
Could anyone please guide me on the correct approach to control component visibility based on user group membership in UI Builder?
I am new to UI Builder, so any suggestions or examples would be greatly appreciated.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2026 01:36 AM
did you try using gs.getUser().isMemberOf() in that script and see if logged in user belongs to any of those groups?
based on that return true/false
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2026 01:53 AM
Hello @harinya ,
Refer this for step to step guide :
Practical UIB Examples: Hide a container/component based on the user's role
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2026 02:25 AM
Hi @harinya
refer this article:
UI Builder - Controlling the visibility of components
UI Builder - Component Visibility Logic
http://youtube.com/watch?v=mEhtN5SslZ8
Builder Deep Dives: Conditional Renderer Component (New in Yokohama!)
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2026 02:26 AM
Hi @harinya
refer this article:
UI Builder - Controlling the visibility of components
UI Builder - Component Visibility Logic
http://youtube.com/watch?v=mEhtN5SslZ8
Builder Deep Dives: Conditional Renderer Component (New in Yokohama!)
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti