Notifications

1579 views

Import Set onAfter script runs for ignored rows during transformation 

 

Problem
When transforming import set data, you can set the ignore object in the onBefore script to true to skip transforming that row. However, if an onAfter script is defined, this script runs even for skipped rows.

See the product documentation for general information about transform map scripts. 
Symptoms
The transform map onAfter script runs when the ignore object is set to true in the onBefore script.

  

Cause
The onAfter script does not have access to the ignore object value from the onBefore script.

 


Resolution
Include a check in the onAfter script to determine the import state of the source row. Ignored rows have a sys_import_state value of "ignored".

For example, you can include the following code to exit the onAfter script if the row was ignored.

if (source.getValue("sys_import_state") === ‘ignored')

return;

Article Information

Last Updated:2017-10-23 12:31:12
Published:2016-01-28