- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 02:39 AM
Hi,
I have an email notification that should send an email to assigned to whenever a new additional comment is inserted.
How can I get only the last comment + how can I get only the comment without date, the sender, etc.
This is what I have in my email notification (a string + a dynamic field)
This is what Im getting in my Preview:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 04:03 AM
Hi @Alon Grod
Use below in your email script
var comment = current.comments.getJournalEntry(1).split('\n')[1];
template.print(comment);
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 02:41 AM
Hi Alon,
We implemented the following email script:
(function runMailScript(current, template, email, email_action, event) {
// Add your code here
//template.print('Worknotes'+current.work_notes.getJournalEntry(1));
template.print(current.comments.getJournalEntry(1).match(/\n.*/gm).join('').replace(/^\s*\n/gm, ""));
})(current, template, email, email_action, event);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2023 04:03 AM
Hi @Alon Grod
Use below in your email script
var comment = current.comments.getJournalEntry(1).split('\n')[1];
template.print(comment);
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 06:57 AM
Try ${comments:1} or ${comments:2} or ...