Creating an total touched report

jjarka
Kilo Contributor

I have been asked by the Service Coordinator to create a report that shows the total number times a Service Desk person has updated an Incident or a request.   Any ideas or suggestion how I would go about doing that?   Would I use the audit table?   Are there any other suggestions or directions I can take in creating this report?

1 ACCEPTED SOLUTION

reedwowens
Giga Expert

Have you looked into using Metrics?   You could only report on modifications after you have set this up but it will work.



  1. Create a new Metric Definition and name it Track Updates.   Here is a screenshot.   Make sure you have on the Incident Table, Field is Updated.
    md1.png
  2. Create a Business Rule on the Incident Table.
    br1.png
    On the Advanced tab enter the following script:

(function executeRule(current, previous /*null when async*/) {


  var definition = new GlideRecord('metric_definition');


  definition.addQuery('name','=','Track Updates');


  definition.query();


  if (definition.next()) {


      var mi = new MetricInstance(definition, current);



      var gr = mi.getNewRecord();


      gr.field_value = current.sys_updated_by;


      gr.field = null;


      gr.calculation_complete = true;


      gr.insert();


  }



})(current, previous);



Now on every update a new metric instance is created with the name of the person who made the change.   You can not use the normal reporting you do for metrics to report on who changed, how many times, etc.


View solution in original post

16 REPLIES 16

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I think you're in the same boat with audit/history. I would look into metrics as there are already some metrics setup around tracking incidents by assigned to, assignment group, and state.


Uncle Rob
Kilo Patron

You could also turn on time-tracking.   That way every save makes a time record for however long the form was open.


Then all you have to do is get a way to report on all the time records submitted by people who are in the ServiceDesk.


PeterWiles
Kilo Sage

Is it just a count of how many times? There is an "updates" field on the task table which is account of how many times the task has been updated.


The trick appears to be that they only want a subset of the touches (via a specific group)


Ah. Helps if I read the question properly.