- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 06:47 AM
Hi,
I'm trying to add scripting to a report that I am creating, but I'm having some trouble and can't figure out how to do this. What I'm trying to achieve is the following: I want to show incidents that have not been updated within the last 24 hours. However, I do not want to include the weekends in this 24-hour count. I could do this by scripting - I just don't know how to add scripting to the conditions of a report.
Any help appreciated, thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 07:08 AM
For your use case what you can do is return the incidents that fall under 24hr bucket and use the condition as sysID is one of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 06:59 AM
Its not possible by OOB reporting , We have to PA indicators for this .
However we can create a schedule job to fill this data perioidcally in a custom table and you can report on that if you dont wanted to look into PA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 07:04 AM
That's a shame, but thanks for sharing. I don't believe performance analytics is being paid for on this instance. I may try your other method.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 07:08 AM
You can call a scriptinclude in report condition
do the following
- create a client callable script include
function inci(id){
var gr = new GlideRecord('core_company');
gr.addQuery('u_services', 'IN', id);
gr.query();
var arr = [];
while(gr.next()){
arr.push(gr.sys_id.toString());
}
return arr;
}
2. Call the script in the report as shown in the below image
For your use case what you can do is return the incidents that fall under 24hr bucket and use the condition as sysID is one of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 08:07 AM
Thanks for your help. Marking this as the correct answer as it's the best answer I received. Thanks to Shaun too!
You can call a scriptinclude in report condition
do the following
2. Call the script in the report as shown in the below image