- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Afternoon everyone.
Looking for a bit of help - I'm creating a new catalog item. We have a mandate that will only let our 'regular users' (i.e., not IT staff) managers have to request access for their staff for certain items, which I've achieved by putting on a reference qualifier on the requested_for variable (manager is (dynamic) me, or manager_manager is (dynamic) me) .
I need to be able to override this for my Service Desk team to be able to raise requests for anyone in the Business.
Is it possible to make the reference qualifier conditional at all?
Many thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use advanced ref qualifier as this
-> if logged in user doesn't have itil role then it applies the reference qualifier and restricts the users
-> if logged in user has itil role then no query it means it will show all active users
javascript: var query = '';
if (!gs.hasRole('itil'))
query = 'manager=' + gs.getUserID() + '^ORmanager.manager=' + gs.getUserID();
query;
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
yes you can handle this using advanced ref qualifier
how are you identifying the Service Desk team?
share screenshots
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi Ankur
I can either do it by their department, or perhaps 'current signed in has ITIL' role. I have two fields on the form that will ultimately be hidden, and returns the person logged in currently javascript:gs.getUserID(); and then another field which dot walks their 'department', which is what I'd thought about using to provide the validation. This field is called 'current_signed_in' and the department is 'current_signed_in_department'. I need to allow 'IT Service Delviery' and 'Banking Systems' departments' access to raise the requests for anyone.
Does that make sense?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use advanced ref qualifier as this
-> if logged in user doesn't have itil role then it applies the reference qualifier and restricts the users
-> if logged in user has itil role then no query it means it will show all active users
javascript: var query = '';
if (!gs.hasRole('itil'))
query = 'manager=' + gs.getUserID() + '^ORmanager.manager=' + gs.getUserID();
query;
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Thanks for the response, Ankur. That hasn't worked, unfortunately. Now, no reference qualifier is applied at all to anyone, regardless of them having an itil role or not. I copied and pasted your query as follows: