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

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

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

      Sample:
      Ent,Acct,description,Dr,Cr

      ,1000,test,100,
      ,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

      Else
      Field5 = Field4

      End If

      'Return Result into FDM
      SQFLD5 = Field5


      End Function

      Can anyone tell me what I am doing wrong?

      Thanks!