Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

How to restrict scheduling the report on weekdays

UTSAV KUMAR JAI
Tera Contributor

I have created a report using Platform Analytics, and I have the following requirements:

  1. The report email should have a dynamic subject line based on the reporting date.
  2. The report should be configured to trigger only on weekdays.

please let me know the available options to achieve this?

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@UTSAV KUMAR JAI 

Option 1 -> you can use scheduled export option, check here

Option 2 -> scheduled job + email script

Scheduling a report for dynamic Recipients based on the table column of the report 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

OlaN
Tera Sage

Hi,

1. The reporting subject line is a simple String field, not a scripting field, so there's no way to have it evaluate dynamically and have different content depending on which day it is.

 

2. You can easily set the report to only send on weekdays by using the conditional field. Set the report to run daily, then toggle the condition field and write this script to only run on weekdays.

var day = new GlideDateTime().getDayOfWeekUTC();
if (day == 6 || day == 7){
	return false;
}
else{
	return true;
}