- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 08:08 PM
Hello,
I have created a Reference Variable in a Catalog Item that looks at the sys_user table and currently it shows all users.
I would like to filter this variable so it only shows users in the same Company as the user raising the Catalog Item.
Eg: I am filling out the form and my company is 'CompanyA'.
When typing into the reference variable field, I only want to see other users from 'CompanyA'.
Currently I only have this:
I am still very new to ServiceNow and am not sure on how to achieve the end result I am after.
Thanks
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 08:37 PM
Hi, if 'Use reference qualifier' = Advanced and you set the 'Reference qualifier' field like this
javascript: 'company=' + gs.getUser().getCompanyID();
Only users with the same company as the logged in user will be shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 08:37 PM
Hi, if 'Use reference qualifier' = Advanced and you set the 'Reference qualifier' field like this
javascript: 'company=' + gs.getUser().getCompanyID();
Only users with the same company as the logged in user will be shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 08:45 PM
Thanks Tony, that worked like a charm!
I really need to learn some javascript 😊