- 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 10:32 AM
Hi Chuck,
Thanks for correcting me 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 10:37 AM
Abinash, how are you doing with this? Let me know if you're blocked somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 12:07 AM
Spot on!!!!! Thanks Chuck, It worked out perfectly ..
But i would like to know what this thing actually do:
var dateRE = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.*\n/;
and how user info also got removed with this code??
eagerly w8ng to noe..
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 06:02 AM
The dateRE line is a regular expression. See episodes 31 and 32 of TechNow for more information. TechNow Episode List
The line basically says look at the beginning of the text for 4 digits, a dash, 2 digits, a dash, 2 digits, a space, 2 digits, a colon, 2 digits, colon, 2 digits and a bunch of stuff after that followed by a new line.
Then the "replace" says 'If you see that, replace it with nothing'.
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View.
Thank you