Skip Function (Conditional Skip)

RES.PblnSkip

Problem: You want FDM to skip all lines of the NewYork file that contain an entity value that begins with 06.

The image depicts the contents of the NewYork.csv GL file.  Some of the entities in the file begin with "06."

Solution: In the Import Scripts screen, you assign the following script, which uses the fParseString function, to the Expression field of the Entity row. The script parses the entity column and uses a local variable that is discarded after the script executes.

--------------------------------------------------------------------
Function NY_Skip06Center [strField, strRecord]	
‘------------------------------------------------------------------
‘ FDM DataPump Import Script:
‘Created by:	FDM_Admin
‘Date created: 2/28/2006
‘------------------------------------------------------------------
Dim strEntity
‘Store first entity in a variable
strEntity = DW.Utilities.fParseString (strField, 3, 1, “-”)
‘Check first two characters of entity
If Left(strEntity, 2) = “06” then
	‘Skip line
	Res.PblnSKip = True
Else
	NY_Skip06Center = strEntity
End if
End Function
--------------------------------------------------------------------

Result: No line that contains entity values that begin with 06 are imported.