nextRecord()
A Step function that interrupts processing of the current record and instructs the DataMapper to move to the next record.
It behaves the same as the Actions step Skip to the next record.
Note: The nextRecord() and stopProcessing() functions are non-blocking calls. The script that follows these functions will be executed to completion. However, the next step in the DataMapper flow will not be executed.
If this behavior is not desired, JavaScript can use an if-else statement to ignore execution of the unwanted part of the script, as shown in the next example:if(record.Field1 === 'CA'){
steps.stopProcessing();
} else {
// script to run
}
Note: The nextRecord() function skips the current record if called before a field is extracted in the current record.
If the nextRecord() function is called after at least one field has been extracted, then the current record will be present in the dataset (output).