- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Need guidance on implementing a ServiceNow UI Action button on the Incident form with conditional visibility. The button should be visible only when the Incident is in an Active state, when the “Assigned To” field is populated, and only if the assigned user belongs to the same Assignment Group (for example, Hardware Group).
Whenever I am trying to add condition, I am not seeing the button
current.active == true &&
!gs.nil(current.assigned_to) &&
gs.getUser().isMemberOf('hardware')
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi AbW, I was testing the condition you used in your case and when I found the incident that matches your condition and I was member of that group, it works for me:
Could you please check if your setting of UI action looks similar to mine?
The condition at the bottom of the setting is copy-paste of your condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi AbW, I was testing the condition you used in your case and when I found the incident that matches your condition and I was member of that group, it works for me:
Could you please check if your setting of UI action looks similar to mine?
The condition at the bottom of the setting is copy-paste of your condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks. I was checking this condition as a system administrator who wasn't part of that group, so I didn't realize I needed to impersonate the 'assigned_to' member. Once I did, it worked as expected 😅
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
It worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
update as this
current.active == true && !gs.nil(current.assigned_to) && gs.getUser().getUserByID(current.assigned_to).isMemberOf(current.assignment_group)
💡 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