I want to populate work notes field from the comments field in alm_hardware table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2025 08:28 PM
I want to populate work notes field from the comments field in alm_hardware table. So that it directly gets logged in activities filter. I want to do this using scripting. Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2025 11:35 PM
it worked for me, are you checking the correct field and how are you verifying that?
See below
Working solution
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2025 11:43 PM
i am putting some value in comments( not additional comments) field, and then saving the record. Then if the code works the comments field value should come in the activities filter directly right?
Comments is a different out of the box field present in alm_hardware table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2025 12:09 AM
comments field on alm_hardware is journal type?
If yes then it should show in activity filter if you have added that field using "Configure Fields" by clicking the funnel icon
If comments OOTB field is String type then use this
current.work_notes = current.comments;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2025 09:32 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2025 09:19 PM
Hi @SamiranD,
Create a Business Rule on the alm_hardware table that triggers when the comments field changes, and copy the content to work_notes field.
if (current.comments && !current.work_notes) {
current.work_notes = current.comments;
}