Left Function

Left (string, # of characters)

Problem: The account numbers of the Indiana_GL file, which are in the first field of each line, include varying numbers of digits. However, the mapping associated with the file uses only four digits.

The image shows a comma-delimited GL file described in the text preceding the image.

Solution: In the Import Scripts screen, assign the following script, which uses the Left function, to the Expression field of the Account row. The script assigns the first four digits of each account number (the first four digits on the left) to Parse_Account.

--------------------------------------------------------------------
Function Parse_Account [strField, strRecord]
‘------------------------------------------------------------------
‘ FDM DataPump Import Script:
‘Created by:	FDM_Admin
‘Date created: 2/28/2006
‘------------------------------------------------------------------
Parse_Account = Left (strField, 4)
End Function
--------------------------------------------------------------------
The image shows the Import Formats screen. The expression for the Amount row of the Indiana  import format contains the Parse_Account.uss script.

Result: The import file displays only the first four digits of each account number.

The image shows the import screen, the contents of which are described in the text preceding the image.