- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 03:46 AM
When our department selects IT, only users whose departments are IT are displayed in the user search list, and users of other departments will not be displayed.How to write in Dynamic ref qual
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2022 08:48 PM
Hi,
No script include is required for this
you can update your ref qualifier as this and it would work for all the scenarios you mentioned
If department is selected it would filter and show users belonging to that department
If department is not selected it would show all users
javascript: var query = ''; if(current.department) query = 'department=' + current.department; query;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 04:00 AM
Hi,
Try adding below reference qualifier to user field
javascript:"department="+current.department;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 04:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2022 08:13 PM
Hi, thank you for responsing, If I did not select department, in the user search list should display all user, What should I do? Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2022 08:44 PM