19 Replies Latest reply: Jul 5, 2016 12:02 PM by Olly Bond RSS

    Trapping Data With Multiple Lines

    Eric O'Steen

      Hi, I am having difficulty in trapping data that sometimes has multiple lines.

       

      My detail trap includes: Loan Number, Service Type, Payee Code, Tax ID, Message

      My append trap is capturing the second line of the Message when the row starts with a blank character.

      Maybe I have these incorrect or switched around?

       

      My issue is that the first loan on this report has a multi-line message 'Tax due within 60 days, Tax Pay Date 02/28'.

      The second loan on this report has a single line message 'Searched By Situs'.

       

      But when I 'Table' the report, the first loan is only updated with the first message line and not the second.

       

      How can I fix this?

       

        • Re: Trapping Data With Multiple Lines
          Grant Perkins

          Hi Eric,

           

          The answer here is going to be to make your Message field a Multi-Line field. Check out the Field Properties.

           

          You can set an "End On" value (amongst other things) so that it becomes variable length depending on what the model finds. You may also want to adjust the field data size to something suitable or make it a MEMO field.

           

          I'm going to assume that your Monarch has the Field Line Function. Have a look at it to discover what it can do if you have not seen it before.

           

          To split the 2 lines of the Message field should you need to, in your model create two new calculated fields (or as many as you might need) and for each new field create a formula using Field Line that extracts the line you want. You can hide the original message field of course. You may be able to create one field then replicate and edit it to create the second.

           

          Does this solve the challenge for you?

           

           

          Grant

           

          PS - Forgot to say - you don't need the "Append" template and in any case the chance is that it's not acting as an append anyway in this case.

           

          Appends would normally be above the detail lines. There are some tricks to work around that but I doubt you will have applied them here, though I could be wrong!

            • Re: Trapping Data With Multiple Lines
              Eric O'Steen

              I am running version 6.00.  My 'Field Properties' doesn't appear to have the ability to make it variable length or a multi-line field.

              I also don't have the Field Line Function or at least don't know where to find it.

              I do have the ability to change the type to Memo, but that didn't do anything differently.

               

              The reason I had to create one of the traps as Append is because Monarch is only allowing me to have one Detail trap.

               

               

                • Re: Trapping Data With Multiple Lines
                  Grant Perkins

                  Hi Eric,

                   

                  Crikey - I had forgotten what V6 looked like!

                   

                  Your multi-line field in the detail just needs the "End on ..." set to Minimum Action Only.

                   

                  Monarch only has one Detail template - it is the key anchor to the entire application - the thing that identifies records at their most detailed level for the purpose of the model.

                   

                  You don't need the Append template.

                   

                  Ordinary Text fields have a max size of 254 characters. That may be enough for you if the Message lines are short and few. If not change it to Memo and you get, from memory, 64,000 characters or something like that.

                   

                  TextLine came along after V6. Do you need to split the messages into separate fields or can you treat them as a block of text? There are tools in V6 to do it - just not as easily as the later TextLine function. I would have to remind myself about what is available.

                   

                   

                  Does that help?

                   

                  Grant

                    • Re: Trapping Data With Multiple Lines
                      Eric O'Steen

                      So, I need to change my Detail trap to be multi-line?

                       

                      The message field can be in a block of text.  So, for example I would want loan #0252128635 to have the full message of 'Tax due within 60 days, Tax Pay Date 02/28' all on the same row once I table it.

                       

                      Do I have this looking right?  When I table it, it looks all wrong now.

                       

                        • Re: Trapping Data With Multiple Lines
                          Grant Perkins

                          Hi Eric,

                           

                          No, the Detail Template should be left as a single line since most records occupy a single line. The trap should be left as it is (assuming it traps all the records you want to trap).

                           

                          Your Trap looks like it should just be looking for any line with a Loan Nbr (or in fact any of the other fields since as far as I can tell they all always exist on any detail line). Only the message line can exist on more than one line and you DO NOT want to trap on each of those lines in this case. The Field definition can ensure that you get all the lines for the Message field.

                           

                          The MESSAGE FIELD within a record should be set as Multi line using the "End On" feature. Just the Field, not the Trap.

                           

                          Doing that means that the detail trap will stay with the detail lines and when you get a record where the MESSAGE Field occupies 2 (or more) lines in its column Monarch will read all of those lines for that field and treat them as a single field for reporting purposes for each record where that happens.

                           

                          HTH.

                           

                           

                           

                          Grant

                            • Re: Trapping Data With Multiple Lines
                              Eric O'Steen

                              Is there now a way to get the data from the 2nd row (when available) to populate on the 1st row of data?  I tried looking in the calculated fields, but I'm not sure what to do.

                                • Re: Trapping Data With Multiple Lines
                                  Olly Bond

                                  Hello Eric,

                                   

                                  Instead of looking at Calculated Fields in the Table, stay in the Report window, and look into the Advanced tab of the field properties.

                                   

                                  Best wishes,

                                   

                                  Olly

                                  • Re: Trapping Data With Multiple Lines
                                    Grant Perkins

                                    Eric,

                                     

                                    I'm going to guess here that your message field is something like 30 character wide and is displaying as a single line.

                                     

                                    Leave the field at whatever width it is for data but double the width for DISPLAY. and the full 2 lines of text, which Monarch now thinks of as a block of text, will display in a single field.

                                     

                                    If you want to use less screen space there is also an option to Show the field contents (It's for when you have a large field but don't always want to see all of it on screen) in a larger viewing box above the usual table.

                                     

                                    If you have a need to split the rows into 2 separate fields  - and you might although it's not yet known what you would do with them - then we can look at that using Calculated fields but if you just want to be able to see the contents in the table all you need to do is make the visible on screen (and for output if necessary) by using the available viewing options or setting the display width of the field to an appropriate value  - typically a multiple of the data width x the maximum number of lines you ever expect to see for a single record in the Message column.

                                     

                                    HTH.

                                     

                                     

                                    Grant

                              • Re: Trapping Data With Multiple Lines
                                Guillermo Wainselboim

                                Good day

                                 

                                 

                                 

                                 

                                What about in version Monarch Pro Version 11.10.1.0?

                                 

                                 

                                 

                                Trying to do the same type capture

                                  • Re: Trapping Data With Multiple Lines
                                    Olly Bond

                                    Hello Guillermo, and welcome,

                                     

                                    You should be OK with the same basic trapping principles in v11 as in other versions.

                                     

                                    If you can email us a sample report or screenshot, we can help you with specific advice.

                                     

                                    The Lesson10.xmod and Classic.prn sample files should give you some ideas around the Address and Media fields.

                                     

                                    Best wishes,

                                     

                                    Olly

                                      • Re: Trapping Data With Multiple Lines
                                        Guillermo Wainselboim

                                        Good morning

                                         

                                        I made several attempts in different ways to try to capture the information on this report

                                         

                                         

                                         

                                        If you’ll notice, there are certain lines that are made up of one line, and some that are made up of 2 (there are a few in the report that may have three, at most)

                                         

                                         

                                         

                                        I need to capture the single and multiple lines as the amount fields are sometimes on the first line and some are on the second line, as is the description which I also need to capture

                                         

                                         

                                         

                                        Thank you for taking the time to review this and see if you can help in right template for capture

                                         

                                         

                                         

                                        Have a wonderful day, and weekend

                                         

                                         

                                         

                                        Respectfully.

                                          • Re: Trapping Data With Multiple Lines
                                            Olly Bond

                                            Hello Guillermo,

                                             

                                            Sorry, but my phone isn't showing any screenshots either in the mail or the web version of your post. Also, I'm afraid that I won't get in front of a machine with v11 until about noon Eastern on Tuesday. So I'm happy to advise but I'm working doubly blind - I can't see your data and can't reference the interface of the version you're running.

                                             

                                            If someone else can help, great. If you can wait until Tuesday, happy to take you through this in a 15 minute Webex then.

                                             

                                            Best wishes,

                                             

                                            Olly Bond

                                            MONARCH ? | ? | ? | ? EXPERTS

                                            www.monarchexperts.com<http://www.monarchexperts.com>

                                            olly@monarchexperts.com<mailto:olly@monarchexperts.com>

                                            • Re: Trapping Data With Multiple Lines
                                              Mario Ruiz

                                              Hi Guillermo, Olly,

                                               

                                              I was browsing the questions, I am a new member at least to the forums.  I do run a lot into this problem.  Where one line may be perfect, yet 2 or 3 have field data, but the main fields data are missing :

                                               

                                              Example:

                                              Acct No   Name             Comment                        Membership

                                              111          John Smith    Active on 6/29/2016

                                                                                    Inactive on 6/30/2016

                                              222         Mario Ruiz      not Active yet

                                              333         Rose Johns     Inactive on 5/31/2015

                                                                                     Active on 5/31/2016         No

                                                                                     Active on 6/11/2016

                                                                                     Inactive on   6/12/2016

                                              Of course, in most of my working examples there are at least 20 fields involved and maybe 1 or 2 fields dangling.

                                              This is what I have done for years, and it works for me.   I entrapped all the report as detail.

                                               

                                              I captured the whole report in a column as Detail.  Then I entrap the appends as Acct No   Name and Comment and membership

                                              Then I would get something like this:

                                               

                                              AcctNo       Name               Comment             Membership    All

                                                                                                                                             Acct No   Name                  Comment                  Membership

                                              111         John Smith    Active on 6/29/2016                           111          John Smith        Active on 6/29/2016

                                              111         John Smith    Inactive on 6/30/2016                                                                  Inactive on 6/30/2016

                                              222         Mario Ruiz      not Active yet                                     222         Mario Ruiz         not Active yet

                                              333         Rose Johns     Inactive on 5/31/2015                        333         Rose Johns       Inactive on 5/31/2015

                                              333         Rose Johns     Active on 5/31/2016         No                                                       Active on 5/31/2016         No

                                              333         Rose Johns     Active on 6/11/2016         No                                                       Active on 6/11/2016

                                              333         Rose Johns     Inactive on 6/12/2016      No                                                      Inactive on   6/12/2016

                                               

                                              This format will allow you to do many things with the records.  I mostly extract the main key (in this example AcctNo), and I export to a db where everything can merge accordingly.  The caveat here is this works most of the time when the key number is on the first row of the record that contains most of the key data.  What this method does it really transfer all the data from the first row to the next consecutive tangling records that belong to the same key identifier (AcctNo),   Once that it sees a new line (with new AcctNo it stops, and starts the same process with the recently found record.  I have had many complex fields where several of them have tangling lines.  I always tried to filter all the records on the last record with the same account number, for that one will contain all the information, that is, if one's main purpose is to get only one record at the end with one AcctNo as unique. For instance if there are 10 rows with many tangling fields (Name, address, SSN, Country, etc),  the last row of this record will contain the most complete string of information. If it goes to a db such as SQL, the export will be fine as long as you have identified the tangling records with a unique identifier (such AcctNo).   If the export has to have unique identifier with one record containing all the info, it gets trickier and more creative.

                                               

                                              In the example above the uniqueness is in the comment, so each comment will be connected to the correspondent AcctNo such as in 333 will have 4 comments.  I really hope this helps.  I know it is a little bit convoluted, but this kind of report usually is.