Need to show only the latest start time based record in task_sla table report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
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! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hey Ankur,
Any update?..
Regards,
Arka