Dynamically create a select box based on user roles / groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello everyone,
today I got an interesting question. A customer wants to have a dropdown where a user can only select items based on the user's groups or roles. I had the idea of writing the options into a table with a list field that holds the applicable user groups. Then I would potentially use a client script to check the items before displaying them in the select box.
It's just an idea. Has anyone done something like that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
you list down the choices in Select box and then use onLoad client script to hide the options based on logged in user role or group membership
you can use g_form.removeOption(), g_form.addOption() methods
💡 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

