- 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 07:49 AM
Hi,
Please see this link: https://community.servicenow.com/community?id=community_question&sys_id=31b25ba1db101fc01dcaf3231f96...
Please mark any reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 07:55 AM
Hi Akhil Kumar,
Create a small basic script include with direct callable function :
function test1(){
var gdt = new GlideDateTime();
gdt.addMonths(-1);
return ("Report of "+gdt.getDate().getByFormat("MM-yyyy"));
}
Call this function using javascript:test1(); from the subject line
Thanks,
Saikiran Guduri (NOW)
(Please mark the answer as correct answer/helpful/accept the sollution if it helps)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018 08:02 AM
Hi Akhil. it is to include in Subject line