- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2018 01:56 PM
I created a report from the incident table, but I expected that the information in the Work Note List will be shown in the report, but this column is shown blank. i verified that Work Note List represent a Log but, can I add it in the report?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2018 05:28 PM
Not easily. In a nutshell, the issue you're running into is that the work notes are actually stored in a separate table. As a journal entry field, the work_notes column is actually only used to temporarily store the entry to be created in the journal table, and then it is cleared before the record is inserted or updated in the database. This is why it's showing up blank in your reports.
If you absolutely, positively have to have this, I'd suggest creating a large read-only text field and writing some business rules using GlideElement's getJournalEntry() method to keep the journal entries synced with the content of the new field.
Hope this helps,
--Dennis R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2018 05:28 PM
Not easily. In a nutshell, the issue you're running into is that the work notes are actually stored in a separate table. As a journal entry field, the work_notes column is actually only used to temporarily store the entry to be created in the journal table, and then it is cleared before the record is inserted or updated in the database. This is why it's showing up blank in your reports.
If you absolutely, positively have to have this, I'd suggest creating a large read-only text field and writing some business rules using GlideElement's getJournalEntry() method to keep the journal entries synced with the content of the new field.
Hope this helps,
--Dennis R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 07:23 AM
ok, if I understood correctly i need add a new field in the form to keep the journal entries using some business rules, but then this information going to be in the DB, rigth?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2020 10:18 PM
Hi Dennis,
As you have mentioned above, that the work notes is stored in a separate table, can you please let me know in which table the work notes are stored.
Thanks,
Kalyan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2020 08:25 AM
They're in the sys_journal_field table. The fields are as follows:
Field | Description |
name | Table name (for example, "change_request") |
element_id | Sys id of record that contains journal entry |
element | Field in table in which journal entry was entered (for example, "work_notes") |
sys_created_on | Timestamp of journal entry |
sys_created_by | User id of user that created the journal entry |
Note that querying this table directly is not a documented feature, so the fields and functionality of the table are subject to change at ServiceNow's whim. Specifically, you're going to run into issues if you try modifying this table, as there is some back-end voodoo that happens that, as far as I can tell, keeps you from transferring journal entries from one ticket to another or re-attributing it.
Still, for specific tasks such as pulling info, it works well enough.