Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 (both all members, and isolating members who have no other assignment groups)

https://yale.service-now.com/sys_user_group.do?sys_id=4da8813ea1a8990494ad46651315d87d&sysparm_from_related_list=false&sysparm_userpref_module=&sysparm_record_target=sys_user_group&sysparm_record_row=1&sysparm_record_rows=89&sysparm_record_list=name%3E%3Dfina%5Eactive%3Dtrue%5EORDERBYname

...