- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2019 07:40 AM
I want to generate a I want to generate a report on task table for one group (task type = catalog task) which will exclude the updates made on weekends and which has been updated only before 2 days. Suppose today I am running the report, it will show the records which has been updated before 2 business days i.e. before 28th June.It should not show records updated on 28th June, weekends and 1st July.
Solved! Go to Solution.
- Labels:
-
Performance Analytics
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2019 07:48 AM
Hi Swarna,
so you can try this; see screenshot below and let me know
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2019 07:48 AM
Hi Swarna,
so you can try this; see screenshot below and let me know
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2019 07:53 AM
Well, thanks for your response.
I created the report same way likewise but it is showing up the records which has been updated on Friday i.e 28th June
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2019 08:11 AM
Hi Swarna,
I think for this you need to have script include and use function; call that from the report
in the server side script do this
1) query the task table with type as catalog task
2) get the updated time sys_updated_on
3) from that time determine the day of week if it is 6 or 7 it means it is weekend; week starts on monday so it is 1 for monday
sample:
var gdt = new GlideDateTime("2011-12-01 12:00:00");
gs.print(gdt.getDayOfWeek());
4) check the difference between now date time and updated time
5) get the difference based on schedule calculation if it is more than 2
6) push the sys_id into array
way to call the script include from report
sys_id is one of javascript: new ReportUtils().getReportRecords();
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2019 06:13 AM
I would use an SLA based on update time that resets on each update and completes on close. That will allow you to handle any business hours requirements (like holidays) and will allow you to adjust it for different items. This should make reporting simple (on the SLA for the item).