Identify If a User Is an Approver in Workflow and Flow Designer.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2025 07:35 AM
Hi,
I have requirement, Need to replace the user with new user for the approval part. Need script for how many catalog workflow and flow a user is the approver. How to find?
Thanks.
Labels:
- Labels:
-
Service Catalog
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2025 10:48 AM
If I'm not wrong, for every approval in Workflow/flow designer it creates entry in Approval table, you can write fix script to see count and replace it accordingly no ?
var approverSysId = 'PUT_USER_SYS_ID_HERE';
var ga = new GlideAggregate('sysapproval_approver');
ga.addQuery('approver', approverSysId);
ga.addQuery('state', 'requested');
ga.addAggregate('COUNT');
ga.query();
if (ga.next()) {
var totalCount = ga.getAggregate('COUNT');
gs.info('Total Approval Records for User: ' + totalCount);
}
Please hit like and mark my response as correct if that helps
Regards,
Musab
Regards,
Musab
