The Zurich release has arrived! Interested in new features and functionalities? Click here for more

transform event script query

adityahubli
Tera Contributor

Screenshot 2025-09-23 115533.png

 

In above picture onstart of row transformation if action is insertion then ignore that records, query i want to run but record is getting inserted why ? 

2 REPLIES 2

ChallaR
Kilo Guru

HI @adityahubli ,

can you try  the below script 

(function transform(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
    ignore = true; // This is the correct way to skip the record
    status.message = 'Skipping record insert as per condition';
})(request, response);

NOTE-

This script might be in the "OnStart" or "OnBefore" section, which does not stop the insertion unless explicitly handled.

  • Ensure the script is active and properly ordered.
    • There might be other transform scripts (e.g., OnAfter, OnBefore) that override this logic.
    • Check if there are multiple scripts attached to the transform map.If the script is inactive or has a lower priority, it might not be executed.

      Other Scripts or Conditions

       

      Please mark it correct and close the thread if this resolves your query  

Thanks,

Rithika.ch

 

Ankur Bawiskar
Tera Patron
Tera Patron

@adityahubli 

onStart works only once and that too before the 1st row is imported.

So it cannot ignore the row as the row has not been reached.

You should use onBefore transform script to ignore.

AnkurBawiskar_0-1758635691693.png

Map with transformation event scripts 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader