You are here: Scripting Reference > Events > BeforeMap

Dataset BeforeMap

The BeforeMap event on the dataset has a special purpose. It allows you to skip records that you do not want to process.

The BeforeMap event has one parameter called Value. This parameter defaults to True and can be set to either True or False. The value of this parameter at the end of the event determines whether the record is processed or not. Set the parameter to False to skip the record. The value of this parameter is passed into the AfterMap event script (if there is one).

Setting the BeforeMap event

Within the script you can perform some checks as to whether you want to process the record and set the Value appropriately. If you do not specify a script for the BeforeMap event then it defaults to True and the record will be processed.

 

Note: During the BeforeMap event, the record in the dataset is not yet open for setting individual field values (because the record may be cancelled if the parameter is set to False).