- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 10:38 PM - edited 09-07-2023 10:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 11:07 PM - edited 09-07-2023 11:09 PM
Hi @Ankit Kumar6,
Oh! got it your exact need. try this scripts.
var managerRecords = new GlideRecord("sys_user_grmember");
managerRecords.addQuery("user.active=false^user.managerISNOTEMPTY");
managerRecords.query();
while (managerRecords.next()) {
gs.info(managerRecords.user.manager.name.toString());
}
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 10:48 PM
Hi @Ankit Kumar6,
You can go to User [sys_user] table and apply the filter as
Active IS false
&&
Manager ISNOTEMPTY
&&
Manager.active IS true
and export it to excel as per need.
OR
Add same filter in addEncodedQuery() in GlideRecord using background scripts.
active=false^managerISNOTEMPTY^manager.active=true
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 10:55 PM
Hi Sagar,
My question is different, i want to get all group manager name who have only inactive user under them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 11:07 PM - edited 09-07-2023 11:09 PM
Hi @Ankit Kumar6,
Oh! got it your exact need. try this scripts.
var managerRecords = new GlideRecord("sys_user_grmember");
managerRecords.addQuery("user.active=false^user.managerISNOTEMPTY");
managerRecords.query();
while (managerRecords.next()) {
gs.info(managerRecords.user.manager.name.toString());
}
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 11:47 PM
Hi @Ankit Kumar6,
Do you need a Group Manager Name or an Inactive User Manager Name?
Thanks,
Anshul