1 Reply Latest reply: May 15, 2014 10:15 AM by Olly Bond RSS

    Help trapping data with indentations and various field lengths

    kaylacalomese _

      Hello,

      I am new to Monarch Pro and I need help with a report. Each entry will have at least 3 rows of data (which I can trap easily). However, some lines will have more data that I need to capture. There is  a maximum of 15 rows per entry. Any entries that have more than 3 rows of data will be preceeded by blank space. The data after the 3rd row is lined up together. I need the report to display all the data, even null data for each entry. Every time I try to capture data beyond the 3rd row, it either omits data or inputs data from the preceeding entry. The first three rows I have trapped using two appends and one detail template. Please provide any assistance possible, any help is greatly appreciated.HELP!!!

       

      I have copied a sample below of various data amounts:Each entry is separated the number 802804.

       

       

       

      802804 6992941748 ARTHUR EC 12/01/12 HE 05/14/13 INELIGIBLE FOR         E 0  L  M  0          03/04            A07          166       HD 05/14/13 MODIFICATION         E 0 0 LF 00

             62004122       016           11/01/12  H6 05/14/13                                                        HE 05/05/13 INELIGIBLE               E

                                                              H7 05/05/13 HAMP                      E

                                                              HD 05/05/13                                                        HA 05/05/13 WORKOUT                E

                                                              HE 05/15/13 Elgible                     E

                                                              H7 05/05/13 HAMP                      E

                                                              H6 05/05/13                              E

       

       

       

      802804 6992941748 ARTHUR EC 12/01/12 HE 05/14/13 INELIGIBLE FOR         E 0  L  M  0          03/04            A07          166       HD 05/14/13 MODIFICATION         E 0 0 LF  00

             62004122       016&11/01/12           H6 05/14/13

       

       

      802804 6992941748 ARTHUR EC 12/01/12 HE 05/14/13 INELIGIBLE FOR         E 0 L   M  0          03/04            A07          166       HD 05/14/13 MODIFICATION         E 0 LF 00

             62004122       016           11/01/12  H6 05/14/13                                                        HE 05/05/13 INELIGIBLE               E

                                                              H7 05/05/13 HAMP                      E

        • Help trapping data with indentations and various field lengths
          Olly Bond

          Hello Kayla, and welcome,

           

          This looks like the right kind of data for Monarch, but I'm a bit confused about what you want to extract. For the first record you have two identical lines saying H7 05/05/13 HAMP E, you have one for the third record, but the second record seems to be only on two lines, not three. There are lines that seem to have more than one field of data on like HD 05/05/13 HA 05/05/13 WORKOUT E - is this really two bits of information?

           

          802804 6992941748 ARTHUR EC 12/01/12 HE 05/14/13 INELIGIBLE FOR E 0 L M 0 03/04 A07 166 HD 05/14/13 MODIFICATION E 0 0 LF 00

          62004122 016 11/01/12 H6 05/14/13 HE 05/05/13 INELIGIBLE E

          H7 05/05/13 HAMP E

          HD 05/05/13 HA 05/05/13 WORKOUT E

          HE 05/15/13 Elgible E

          H7 05/05/13 HAMP E

          H6 05/05/13 E

           

           

           

          802804 6992941748 ARTHUR EC 12/01/12 HE 05/14/13 INELIGIBLE FOR E 0 L M 0 03/04 A07 166 HD 05/14/13 MODIFICATION E 0 0 LF 00

          62004122 016&11/01/12 H6 05/14/13

           

           

          802804 6992941748 ARTHUR EC 12/01/12 HE 05/14/13 INELIGIBLE FOR E 0 L M 0 03/04 A07 166 HD 05/14/13 MODIFICATION E 0 LF 00

          62004122 016 11/01/12 H6 05/14/13 HE 05/05/13 INELIGIBLE E

          H7 05/05/13 HAMP E /CODE

           

          You shouldn't need multiple templates, just one detail trapping on a two line sample, with the trap picking up the 802804 characters. Define a field that starts in line 1, and in the Advanced tab of the field properties, set it to end on "blank field values" of 1. This will pick up the whole set of text as a memo field, and you can extract bits from it using textline(;3), textline(;4) etc.

           

          Another option, if the H7, HD, HE etc codes have a particular logical meaning, would be to use the preceding string (again, in the advanced field options). But with two H7 records for one entry, this might not be what you're after.

           

          The advanced field options can be a bit strange when you first encounter them, but they're really helpful. If you're stuck, don't hesitate to send me a mail and I'll reply with a model that should help you on your way.

           

          Best wishes,

           

          Olly