1 Reply Latest reply: May 15, 2014 9:53 AM by Dee Moore RSS

    record count for peachtree import file

    John Bass

      I am trying to create a Sales Journal import file for Peachtree Accounting (csv format) using Monarch. I have created a model that will extract all the necessay fields from a report generated by my POS software.  So far so good.  However, Peachtree requires a "Number of Distributions" field in each record of the import file.  The value of this field must equal the number of records created by my model. Here is an example where the 5th field in each record contains a count of the total records in the file:

       

      record1: field1,field2,field3,field4,3,field6

      record2: field1,field2,field3,field4,3,field6

      record3: field1,field2,field3,field4,3,field6

       

      I haven't been able to figure out a way to do this using Monarch.  Any help would be greatly appreciated.  Thank you.

        • record count for peachtree import file
          Dee Moore

          Hello John,

           

          Unfortunately, there is no function that will return the number of rows/records in the Table Window.

           

          To work around this issue:

           

          Create a Summary.

           

          In addition to the fields listed, bring the "count" field in with the rest of your Measure fields.

          In the General tab of the Summary Definition, change the Label: "Summary" to something unique from the first position of the first field. A Numeric value should work if your data begins with an Alpha Character, an Alpha Character if the data begins with a Numeric.

           

          Export from the Summary creating a Fixed Width Text file (in the OptionsExport and....do not include the Field Headers as the first row of output).

           

          Bring the new file into Monarch and build a Model that will extract the Field Data as Detail (trap using an à or Ñ in the first position), define the fields. And extract the last line containing your unique Label: ? as a Footer (trap using the reverse as above in the first position). Define the new field.

           

          No matter the number of rows/records in the file, the second model will create a field that contains the correct number.

           

          I hope this is helpful,

           

          Dee Moore

          Datawatch Technical Support