- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 07:39 AM
Hi,
I have to schedule a report in servicenow.
I want a subject line as " Report of MM-YYYY" format
the month should be previous months.
Any one knows the java script ,, kindly post the answer.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:16 AM
Hi Akhil,
Exactly I thought of it and tried to put that content into subject line. BUT unfortunately the subject field has a Limit of 80 characters. 😄 :D. Can't help it there.
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful/accept the solution if it helps)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:05 AM
okk..
if I want to add some text like
"Report for"+ script
will this work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:08 AM
I have added the text in the script itself "Report for"+<FORMATTED_DATE>.
If you want more text to be added continue it in the same place(in script).
Once this part is done you should write this into the subject line:-
javascript:test1();
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful/accept the solution if it helps)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:12 AM
can I put the whole script in the subject line ( that you gave in the first reply )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:16 AM
could plz send me a screenshot that you have done.. where to put script and where to call the function

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:20 AM
Hi Akhil,
Exactly I thought of it and tried to put that content into subject line. BUT unfortunately the subject field has a Limit of 80 characters. 😄 :D. Can't help it there.
You need to create a "Script include" for keeping that script.
Type "Script includes" in left navigator and create a script include and name it as something eg: test1.
Copy paste the script I mentioned above into that script include. Save it. Then come to subject line in this scheduled reports and out the javascript:test1();.
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful/accept the solution if it helps)