How to add import log when duplicate coalesce field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 08:43 AM
If an import finds a target table record with the same values for all joined fields as a staging table record, I would like to output a message in the import log.
Is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 09:15 AM
if all values match then it means it's an update.
you can use onBefore transform script and check the action is update
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
if (action == 'update' && target.fieldA == source.u_fieldA && target.fieldB == source.u_fieldB) {
log.info('My message');
}
})(source, map, log, target);
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
09-08-2025 02:15 AM
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
