Report on UI Action being clicked?

mburns74451
Tera Contributor

On our incident form we have a UI action named "Escalate." Is there a way to create a report to see who has clicked on that UI action button?

The reason for the ask is trying to see which of our level 1 agents are clicking the escalate button. Wanting to track how many times the button is being clicked to determine where we need to improve our documentation for level 1 agents to resolve more incidents where possible.

Thanks,

1 ACCEPTED SOLUTION

Mike_R
Kilo Patron
Kilo Patron

I would just create a report using the Reassignment count field that is available on the Incident Record. 
Example

Mike266_0-1664820563735.png


Otherwise, you can do this:

1. Create a new event in the event registry

2. Edit the UI Action to call the event gs.eventQueue('event.name', recordObject, event.parm1, event.parm2);

3. Report on the events from the event log

View solution in original post

5 REPLIES 5

Kartik Sethi
Tera Guru
Tera Guru

Hi @mburns74451 

 

To accomplish your requirement we would require to create a custom table. OOTB I don't think there are any such audits or metrics in the instance to capture stats as per your requirement (logically thinking UI Actions are the most used components in ServiceNow which if audited will generate huge logs).

 

I could suggest a solution, using:

  1. Custom Table "UI Action Audit"
  2. OnSubmit Client Script
  3. Client-callable Script Include

Steps that you can follow:

  1. Create a Custom Table with details you want, e.g. Number(autogenerated), UI action Clicked on (date), Clicked By, etc.
  2. Create an OnSubmit Client Script on the table where the UI Action "Escalate" is available and in the Client Script
  • Capture the UI Action Name using

 

g_form.getActionName()​

 

  • Match the Action Name with the Action Name for Escalate UI action, if it matches then make GlideAjax call to the Script Include
  • To the Script Include pass the Parameter of User ID:

 

g_user.userID​

 

  • Let the Script Include create a new record in the Custom Table
  • Create the desired report on the data available in the Custom Table

 

 


Please mark my answer as correct if this solves your issues!

If it helped you in any way then please mark helpful!

 

Thanks and regards,

Kartik