- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 05:09 AM
Hello,
Is there any way we could ignore any new insert if my coalese field is not matching the existing record. I want to skip such record i.e. it should not insert into the target table.
Regards,
John
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 05:11 AM
Hi John,
Please create a OnBefore transform map script and use the below code to ignore any new inserts.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
if (action == 'insert') {
ignore = true;
}
})(source, map, log, target);
Please mark correct/helpful if applicable.
Regards,
Shubham
Shubham Tipnis
ServiceNow Enthusiast
⭐️ 3x Rising Star (2022–2024) – ServiceNow Community
Sharing insights, use cases & real-world learnings from the Now Platform
Always learning. Always building.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 05:11 AM
Hi John,
Please create a OnBefore transform map script and use the below code to ignore any new inserts.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
if (action == 'insert') {
ignore = true;
}
})(source, map, log, target);
Please mark correct/helpful if applicable.
Regards,
Shubham
Shubham Tipnis
ServiceNow Enthusiast
⭐️ 3x Rising Star (2022–2024) – ServiceNow Community
Sharing insights, use cases & real-world learnings from the Now Platform
Always learning. Always building.