I want to use the rejection comment within the workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
I want to copy the rejection comment for a requested item into a field in a separate table.
Since the rejection comment is recorded in a "Journal" type field, retrieving it within a flow includes unwanted extra information.
Is there a way to retrieve *only* the comment itself?
It would be ideal if it were managed in a specific table somewhere...
I would like to resolve this using flow actions rather than scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
Hi @bonsai
You can use the .getJournalEntry(1 ) method to parse out just the newest comment without dates or user details.
Use a Run Script or Script step in your flow with the following Script:
var currentItem = fd_data.trigger.current;
var latestComment = currentItem.comments.getJournalEntry( 1); // dont give space before 1
currentItem.setValue('u_your_custom_field', latestComment); // Populate the separate field/table (use glide record) with this extracted text
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
after the approval step use Lookup record step on sys_journal_field with query like this and grab the Value column which gives you the text entered
Element ID = sysapproval_approver record sysid
Then use the output from this step and do whatever you need to do as per business requirement
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader