Import Script Parameters

The import format script is defined as a Jython function. The Jython function name should be same as the script file name. This function accepts two parameters: the current Field and current row being processed.

  • strField—The values of the source-file column that is defined in the import format (For example, for import scripts assigned to the Amount column, strField contains amount values, and, for import scripts assigned to the Account column, strField contains account values.

  • strRecord—The source-file line (record) that is being scanned.

In following example, the script concatenates the account code with the account description from the source file. For example, the first data line of the file is account code 1110 with a description of "Cash". This script concatenates 1110 with "Cash" and creates a source account in the TDATASEG table named "1110-Cash". (See TDATASEG Table Reference). In the script, you select the field that is defined by the import format, and then the field defined by places 14 through 34 in the current record. (Jython starts numbering columns with 0 rather than 1.)


Image shows Script Editor with Import Script