Extracting End of String

Problem: The NewJersey screen 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 General Ledger screen. The format of the file is described in the text preceding the image.

Solution: In the Import Formats screen, assign the following script to the Expression field of the Account row. The script extracts and returns the account numbers (the last four characters of the account fields):

def Parse_Account (strfield, strrecord):
return strField[-4:]

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