The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Need to show only the latest start time based record in task_sla table report

Arka Banerjee
Kilo Guru

Hi Team,

 

I have created a few bar charts from view\run report module for HR case SLA's. The problem is for HR cases where multiple SLA's are attached, they are showing up as multiple records. I want to show only the latest start time based SLA record per HR case, so that each case shows up only once. Can you please help me with how I can achieve this.

 

@Ankur Bawiskar 

5 REPLIES 5

GlideFather
Tera Patron

Hi @Arka Banerjee,

 

how did you configure this?

 

If it is by script, you can use something like:

slaGR.orerdBy('created_on');

slaGR.setLimit( 1 );

 

Which will sort it by the creation date and then you select the only 1 record so it will be always the latest one

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Ankur Bawiskar
Tera Patron
Tera Patron

@Arka Banerjee 

I believe you are using task_sla table and yes 1 HR case can have multiple SLAs attached to it.

you can create database view by joining task_sla and HR case table

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

 

How do I restrict it to show a single SLA per case(the latest SLA) after creating the database view. Could you please help me with the same asap.

 

Thanks!

Hey Ankur,

 

Any update?..

 

Regards,

Arka