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.
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 --------------------------------------------------------------------
Result: The import file displays only the first four digits of each account number.