Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Schedule report in business hours

rubicastro
Tera Contributor

Hello everivary.

I have a question, I need to chagne a schedule report where was working if in two days doesn't correspond to business days and hours. I did a new report with SLA but the this doesn't represent why they want. They want a script but I don't know who and where put the script. Because I think if I'll do a scrip I'll need a new field.
The screenshot represent the report that is expected to have only for business days and hours.

 

rubicastro_0-1737053740125.png
If someone have an Idea I'll appreciate.
🙂 

 

6 REPLIES 6

Is a little confusing, what I try to do is make the report only for business hours, in the condition builder I use; Updated-relative-after 2 days. But the condition doesn't represent on business hours on days, just show 2 days

Najmuddin Mohd
Mega Sage

Hi @rubicastro ,

Instead of two days ago, you need two business days ago.
For this, there is an GlideScheduleAPI() which you can use.


Brief solution design would be, create a script include, and take the last two days and pass it into .isInSchedule() which returns true or false if that days are there. If false, go a previous day and check it again.

Link : https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/app-store/dev_portal/API_reference/...


If the above information helps you, kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.