Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Skip import set record when empty field available in file

Mohan22
Tera Expert

Hi Team,

 

I want to skip the records while importing from data source if name field is empty and also need to skip records if name field have duplicate values?

 

Thanks,

Gan

2 REPLIES 2

Murthy Ch
Giga Sage

Hi @Mohan22 
For your first point you can below logic in onBefore transform script:

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

    // Add your code here
    if (source.u_name == "") //here replace with your name field
        ignore = true;

})(source, map, log, target);

For avoid duplicate you can check the Coalesce field.

MurthyCh_0-1666714557940.png

Hope it helps

 

 

 

Thanks,
Murthy

Thanks for quick response.

we are not looking while transform. we are looking at importing the data into data source