Skip to content

Flow documentation · legacy product

AfterMap ​

Dataset AfterMap ​

The AfterMap event on the dataset has a special purpose. It allows you to skip the processing of child datasets.

The AfterMap event has one parameter called Value. This parameter defaults to the parameter value from the corresponding Dataset BeforeMap event procedure (i.e. if Value was set to False in BeforeMap then AfterMap is still called, but with the Value parameter set to False). The value of this parameter at the end of the AfterMap event determines whether child datasets will be processed or not. Set the parameter to False to skip processing of child datasets.

If there are multiple child datasets this will skip the processing of all of them. If you want finer control you should instead use the BeforeMap events of the child datasets. Set the ones you don't want to False and leave the others.

Setting the AfterMap event ​

Within the script you can perform some checks as to whether you want to process the child datasets and set the Value appropriately. If you do not specify a script for the AfterMap event then it defaults to the Value from BeforeMap and the child datasets may or may not be processed.

TIP

Note: By the time the AfterMap event is called, a record has been created in the destination dataset (and typically values will have been set for individual fields via the OnMap events). To remove this current, about-to-be-saved record, use the Delete(0) method on the dataset. See Delete for more information. If the dataset has one or more child datasets, then also set the Value parameter to False as described above.