- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 02:55 AM
Hi,
I tried to check in a mail script and a business rule if a field of journal type is empty,
what is the best way to do it? does it different if i'm using "Journal Input" field?
thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 03:09 AM
Hi Eli,
Journal field will always be empty.
You can check with below line:
current.fieldName.getJournalEntry(-1);// It will bring all the journal entries which were added to this
If empty then no entries were added.
Using Journal Fields - ServiceNow Wiki
Please mark answer correct if it was.
Thanks,
Darshan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 03:09 AM
Hi Eli,
Journal field will always be empty.
You can check with below line:
current.fieldName.getJournalEntry(-1);// It will bring all the journal entries which were added to this
If empty then no entries were added.
Using Journal Fields - ServiceNow Wiki
Please mark answer correct if it was.
Thanks,
Darshan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 03:48 AM
Thank you.
Another question regarding the journal field - how can is get only the text without the time stamp or the user who provided the comments?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2017 08:58 AM
You need to grab the latest journal entry, split it up, and grab the second chunk...
e.g.
var journalStr = current.work_notes.getJournalEntry(1);
var splitJournal = journalStr.split("\n");
var textOnly = splitJournal[1];
JarodM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014 03:55 AM
Hi Eli,
Every comments done in Journal field gets stored in "sys_journal_field" table.So you can get only text by Quering this table for specific record.
Thanks,
Darshan