Add a timestamp to a scheduled report

Not applicable

We have a few scheduled reports that are delivered to our service delivery manager daily, currently the subject / file name is the same everytime.

 

Is there a way to timestamp either the subject line or attachment file name?

1 ACCEPTED SOLUTION

CapaJC
ServiceNow Employee
ServiceNow Employee

When configuring a Scheduled Report, the Subject line now accepts JavaScript. e.g., the following in the Subject of a scheduled report will put the current date in the resultant email (e.g., for a report of today's problems):

javascript:"Problems created on " + gs.now();


View solution in original post

21 REPLIES 21

I figured out the issue. Service now javascript is by default in GMT... for using user defined time, which is primarily your system time use this



javascript: "Enter text here" + gs.nowDateTime();


Good catch!


Anyone know if we can do this in the title line of a standard report?


Yes Kim. If you are using scripting.



email.setSubject("Request Desk Task Report @" + gs.nowDateTime());



Thanks,


Malaya


montanadawgz
Mega Contributor

Looking to add the value for "Previous Month, Current year", in a Bar graph Title and Subtitle.

This article is for adding a title to a scheduled report, which sends a notification.  I am looking at how to do this in the actual report.