Transform map script use case

Hiteish222
Kilo Guru

I want to import an excel with fields like sr_no, name, phone and with 100 records.

scenario is that , I want to only insert records after 50th records and also if in any record phone field value is empty 
then that record should not be inserted.

how can we achieve it ? 

1 REPLY 1

webdark382
Tera Contributor

Hi,

 

 Please use onBefore Transform Script as below:


(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
var num = parseInt(source.u_sr_no);
if(num <= 50 && !source.u_phone){
ignore = true;
return;