- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2025 11:57 PM
Hi Community,
I'm currently working on a Service Catalog Item where I have two variables:
Business Unit (Reference to business_unit)
Model User (Reference to User [sys_user])
I want Model User to show only users that belong to the department selected in the Business Unit variable.
I tried adding a Reference Qualifier Script on Model User with this code:
function qualifier(current) {
var item = current.request.item;
var department = item.variables.business_unit;
if (department) {
return 'department=' + department.toString();
}
return '';
But it's not filtering the list of users — I’m still seeing all users instead of just the ones in the selected department.
I also created a Script Include and a Catalog Client Script in an attempt to filter this, but it’s not working either.
I'm happy to share that code if it's helpful — just let me know.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 12:05 AM
try this
javascript:'department.business_unit=' + current.variables.business_unit;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 12:05 AM
try this
javascript:'department.business_unit=' + current.variables.business_unit;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader