Is there a way to count users who worknote an Incident and it assingment group?

gmorales
Kilo Expert

I got this requirement and I've tried everything, I tried to create a report from sys_audit table but is to limited, I tried to create a metric using this Script, but didn't work either (found on Re: Report on all the tasks updated by an user(Should include if the user previously updated the tas... ) I'm running out of ideas, reports are not my strong point.

var changedfields=[];

if(current.sys_updated_by.changes())

  {

  changedfields.push('sys_updated_by');

}

if(changedfields.length>=0)

  {

    var fields="["+changedfields.toString()+"]";

  gs.eventQueue("metric.update",current,fields,current.sys_mod_count,"metric_update");

Please if some have suggestion let me know.

6 REPLIES 6

This is pretty challenging. Since a user can be a member of multiple groups, you won't know for sure which group he/she was acting on behalf of.



I created something like this for a client and it turned out to be a separate table and a rather long script include and business rule. The client's users are typically a member of multiple groups, so for every person who updated the incident, it would create one entry in the new table for each group membership the user had.


Linda S
ServiceNow Employee
ServiceNow Employee

Not exactly what you were looking for but have to looked into Time worked  



This will allow you to capture the amount of time a user is on the record, updates or not.