Right Function

Right (string, # of characters)

Problem: The NewJersey file presents account numbers as the last four characters of account fields. You want to extract only account numbers.

The image shows the contents of the NewJersey GL file. The format of the file is described in the text preceding the image.

Solution: In the Import Formats screen, assign the following script, which uses the Right function, to the Expression field of the Account row. The script assigns the account numbers (the last four characters of the account fields) to NJ_ParseAccount.

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

Result: In the Account column of the import file, only account numbers are displayed.