- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 08:11 AM
Hi,
I want to remove the date & time stamp and user info from my email notification and only want the text message. I am doing it on comment field for RITM.
Kindly help me to fix this
Thanks in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 09:37 AM
Your mail script would look something like this. Note, this is not a drop-in solution. You should understand what it does and make appropriate modifications for your table, field, and desired results.
var comment = current.comments.getJournalEntry(1);
var dateRE = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.*\n/;
template.print(comment.replace(dateRE, ''));

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 08:18 AM
You would have to do this yourself via mail script.
You can get the latest journal entry via the getJournalEntry(1) method: example:
inc.comments.getJournalEntry(1)
and then you can use a regular expression to strip out the date/time/name to get just the text.
Scripting for Email Notifications - ServiceNow Wiki
Email Notifications - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 08:41 AM
Thanks chuck... but can u plz show me sample kind of mail script for achieving this requirement... which doesnt contains the time stamp and user info

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 09:37 AM
Your mail script would look something like this. Note, this is not a drop-in solution. You should understand what it does and make appropriate modifications for your table, field, and desired results.
var comment = current.comments.getJournalEntry(1);
var dateRE = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.*\n/;
template.print(comment.replace(dateRE, ''));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 01:20 AM