The CreatorCon Call for Content is officially open! Get started here.

How to ignore an insert from data load via transform map.

John Levi
Kilo Contributor

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

1 ACCEPTED SOLUTION

Shubham Tipnis
Kilo Sage

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

Regards,
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.

View solution in original post

1 REPLY 1

Shubham Tipnis
Kilo Sage

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

Regards,
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.