2 Replies Latest reply: May 15, 2014 9:57 AM by Grant Perkins RSS

    Text Template Question

    Ray M

      I have a Text Document I need to extract the data into an Excel Spreadsheet.  The Document looks similar to the following

       

      Employee Info:Sam Jones 111-11-1111  10.00

                     Curr    MTD     QTD      YTD

      Gross Pay:     100.00 1500.00  3000.00  6000.00

      Net Earnings:   89.00 1321.00  2513.00  4899.00

       

      ....

       

      If I create a Detail Template on Line 1 getting the Employee Info and then Append Templates on the Gross Pay line and the Net Earnings Line When I look at the Data the 1st Employee has null in all of the amounts and their name in the name column but the name info is in the last 3 columns.  Shouldn't it be in the 1st three?  How do I fix this?

        • Text Template Question
          Nick Osdale-Popa

          Append Templates must always occur before the Detail Template, otherwise you'll get the results you are describing.

           

          You can approach this several ways. One way is if your information records always appear as you show:

           

          Employee Info: xxxxxxxxxxxxxxxxxxxxxxxxxx

          Curr MTD QTD YTD

          Gross Pay: $$$$ $$$$ $$$$ $$$$

          Net Earnings: $$$$ $$$$ $$$$ $$$$

           

          Then you can select all 4 lines as your Detail Template and create the fields accordingly.

          • Text Template Question
            Grant Perkins

            Originally posted by Ray M:

            If I create a Detail Template on Line 1 getting the Employee Info and then Append Templates on the Gross Pay line and the Net Earnings Line When I look at the Data the 1st Employee has null in all of the amounts and their name in the name column but the name info is in the last 3 columns.  Shouldn't it be in the 1st three?  How do I fix this? /b[/quote]Typically a Monarch model/table when first created will display the extracted data in the order hierarchy of the assumed report layout: Headers - Detail - Footers .

             

            Nick's answer for the first part would most likely fix the second part of the question as well but just in case it does not you can always change the order of the columns in the table to obtain the results you require.

             

            In reality the entire record SHOULD be treated as DETAIL if possible since none of the data rows could possibly relate to other records. Remember that headers (append templates) and footers have the functionality of associating with many records by default. If all of your records have the same data lines then you can model them as a single detail record. If they don't and you use Append templates you will likely find that incorrect data appends occur for some records.

             

            On the other hand if you do have different data rows for different records there are several ways to approach that difficulty as well so let us know if that remains a problem.

             

            HTH.

             

             

            Grant