5 Replies Latest reply on Aug 3, 2009 7:27 PM by JTF85

    Import Format for Separte Debit and Credit Columns (comma delimited file)

      I have a file that is comma delimited with a sparate debit column and a separate credit column:


      ,110010,another test,,100

      My import format is this:
      Comma delimited

      Field Number Number of Fields Expression
      Entity 1 5 SGB_ABC
      Account 2 5
      Amount 5 5 Script=DRCRSplit_Comma_Del.uss

      I've tried writing the following script to pull the amount from the debit column into the credit column but it just skips the lines with no amount in field 5.

      'Declare Variables
      Dim Field4
      Dim Field5

      'Retrieve Data

      Field4 = DW.Utilities.fParseString(strRecord, 4, 4, ",")
      Field5 = DW.Utilities.fParseString(strRecord, 5, 5, ",")

      'If Field4 has a value then fld 5 is to equal fld 4.

      If IsNumeric(Field5) Then

      Field5 = Field5

      Field5 = Field4

      End If

      'Return Result into FDM
      SQFLD5 = Field5

      End Function

      Can anyone tell me what I am doing wrong?