I want to stop Transform by checking the value of the field of the first record in Transform Map.

chanken
Tera Contributor

Hi Everyone,

I want to stop Transform by checking the value of the field of the first record in Transform Map.

Since OnStart has not read records yet, it can not be determined.

Can I recognize the first record on OnBefore? Is there any other good way?

regards.

 

5 REPLIES 5

Shishir Srivast
Mega Sage

You can have the ignore = true; after checking the value of first record in source to stop the entire transformation.

chanken
Tera Contributor

Hi Shishir,


Is ignore = true only by ignoring the current record?
Also, how we you judge the first record?

regards.

You want to check a particular value of the Source record? I believe the transformation start from the first source record.

OnStart()

IgnoreBoolean FlagWhen set to true, the entire transformation will be stopped and no further processing will occur.

Not applicable

Hi Chanken,

Use onBefore Transform map script and write code as following example :

if(source.u_field1 == '') // Put your condition to check here

  {

     ignore = true; //ignores tranformation of the row if condition matches

  }

 For more information on Transform map script and execution order please refer the following blog :

http://www.john-james-andersen.com/blog/navigating-transform-scripts-in-servicenow.html

Mark if correct

Regards

Ajay

find_real_file.png

www.dxsherpa.com