how to capture the latest comment in email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2017 10:55 PM
Hi Everyone,
In the email notification getting all the comments from initial on wards, but i need only the latest additional comment in the chain.
Please give some solution to capture the latest comment.
Thanks In Advance,
Immanuel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2017 10:57 PM
Hello Immanuel,
you need to use below script to get the latest journal entry from comments field.
current.comments.getJournalEntry(1);
only last additional comment in notification
ServiceNow Commnunity MVP -2018 class.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2017 01:17 AM
with out script you can do that.
2 Restrict the Number of Entries Sent in a Notification
Administrators can control the number of journal entries notifications include with the following system property.
Property | Label | Description |
---|---|---|
glide.email.journal.lines | Number of journal entries (Additional comments, Work notes, etc.) included in email notifications (-1 means all). | Specifies the number of entries from a journal field (such as Additional comments and Work notes) included in email notifications. A value of -1 includes all journal entries.
|
Most recent 'comment' in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2017 03:11 AM
Hi ,
If we updated any comment the activity log capturing all the previous comments also.
i need to capture the latest comment in the activity log. how to do this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2017 03:17 AM
have you tried with above solution.
3.27 getJournalEntry(int)
Gets either the most recent journal entry or all journal entries.
Parameters: -1: get all journal entries, 1: get the most recent journal entry.
3.27.1 Output Fields
Returns: (Sting) For the most recent entry, returns a sting that contains the field label, timestamp, and user display name of the journal entry. For all journal entries, returns the same information for all journal entries ever entered as a single string with each entry delimited by "\n\n".
3.27.2 Example
var notes = current.work_notes.getJournalEntry(-1); //gets all journal entries as a string where each entry is delimited by '\n\n' var na = notes.split("\n\n"); //stores each entry into an array of strings for (var i = 0; i < na.length; i++) gs.print(na[i]);
also with properties it will work.