- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2019 11:34 PM
Hi Experts, I need to get the records based on the following conditions/filters:
I want a filter option called “Assigned Manager” that shows Incidents where the User Reference entered is:
1. The Manager of a User in the Assigned_to field,
or
2. is the Manager of the Assignment group to which it was assigned.
---------> I had tried to the with following filters as
"Assigned_to.manager - is - gs.getUserID()"
or
"Assignment_group.manager - is - gs.getUserID()". - > but it get the records which are assigned to the current user.
Can you please share your thought to achieve this requirement.
Thanks in advance for your valuable thoughts
Thanks
Santhosh.K
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2019 11:45 PM
Hi there,
Have you tried using:
gs.getUser().getManagerID();
Also have a look at:
https://www.servicenowguru.com/scripting/user-object-cheat-sheet/
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 06:31 AM
Thank you guys for your valuable time and suggestions,
As of my Requirement:
Need to set default filter for a specific module as follows:
1. Assigned to.manager: Get the list of records of current users manager ---
For the above condition, I had added "Assigned_to.manager - is - javascript:gs.getUser().getManagerID()" filter.
2. Assignment_group.manager: Get all the list of groups records, where the current user's manager, act as a manager.
For the above condition, i had Added "Assignment_group.manager - is - javascript:gs.getUser().getManagerID()" filter.
Now It's working as expected.
May this post will helpful for some one, in future.....
Again, Thank you every one(Mark, Rahul, and Asifnoor) to responding to my post.
Thanks
Santhosh.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 06:32 AM
Thank you guys for your valuable time and suggestions,
As of my Requirement:
Need to set default filter for a specific module as follows:
1. Assigned to.manager: Get the list of records of current users manager ---
For the above condition, I had added "Assigned_to.manager - is - javascript:gs.getUser().getManagerID()" filter.
2. Assignment_group.manager: Get all the list of groups records, where the current user's manager, act as a manager.
For the above condition, i had Added "Assignment_group.manager - is - javascript:gs.getUser().getManagerID()" filter.
Now It's working as expected.
May this post will helpful for some one, in future.....
Again, Thank you every one(Mark, Rahul, and Asifnoor) to responding to my post.
Thanks
Santhosh.K

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 10:48 AM
Okie. Kindly mark my comment as helpful if it has helped.