...
Code Block |
---|
function findItil() { var user_array = []; var role_id = [] var user_has_role = new GlideAggregate('sys_user_has_role'); user_has_role.addEncodedQuery('role=b4c1f5331011100094adb14c071ff154^user.active!=false^user.emailISNOTEMPTY^user.user_nameISNOTEMPTY'); user_has_role.addAggregate('COUNT', 'user'); user_has_role.query(); while (user_has_role.next()) { user_array.push(user_has_role.user.user_name); } return user_array; } |
Getting a list of members of Financial Approvers
That's the basis for the maximum possible numbers. I'm counting 189 today.
What we really want is what we're describing at: https://yale.service-now.com/nav_to.do?uri=sc_task.do?sys_id=7af754d2f9146144fcb0542a9ae2793c%26sysparm_view=portal
which is that we want a collection of users who are Financial Approvers, but not a member of any other group.