DW.Utilities.fParseString (string, total field count, field # to return, delimiter)Note: | The fParseString function, which is used to parse strings that contain delimiters, is a FDM function, not a Visual Basic function. |
Problem: The NewYork file presents cost center, account, and account description in one field, rather than in three fields. The three strings are separated by dashes ( - ). You want to present the three strings as three fields.

Solution: In the Import Formats screen, assign the following scripts, each of which uses the fParseString function, to the Expression fields of the Entity, Account, and Account Description rows (first script to Entity, second script to Account, and third script to Account Description). The first script returns the set of characters before the first hyphen (a cost center value), the second script returns the set of characters after the first hyphen (an account value), and the third script returns the set of characters after the second hyphen (an account description value).
-------------------------------------------------------------------- Function NY_ParseCenter [strField, strRecord] ‘------------------------------------------------------------------ ‘ FDM DataPump Import Script: ‘Created by: FDM_Admin ‘Date created: 2/28/2006 ‘------------------------------------------------------------------ NY_ParseCenter = DW.Utilities.fParseString (strField, 3, 1, “-”) End Function --------------------------------------------------------------------
Function NY_ParseDesc [strField, strRecord] ‘------------------------------------------------------------------ ‘ FDM DataPump Import Script: ‘Created by: FDM_Admin ‘Date created: 2/28/2006 ‘------------------------------------------------------------------ NY_ParseDesc = DW.Utilities.fParseString (strField, 3, 3, “-”) End Function
Result: In the import file, cost center, account, and account description strings are presented in three separate fields.