3 Replies Latest reply: May 15, 2014 10:03 AM by Grant Perkins RSS

    Help with a Variation of the "Guru" Trap - FIRST Line of Detail is Occasional

    MarisaLS _

      Greetings!

       

      I tried using the "Guru Trap" to handle occurrences of "occasional" data in a certain report, but I did not know how to define the field in the Append template. I could not use the standard suggestion of "String ___ anywhere in previous line" or "Preceding string ___ in current line."

       

      I think that I may need a variation on the Guru Trap for this report - what's different is that the occasional data would actually be on the first line of the detail area instead of somewhere after the first line, as follows.

       

      Example without occasional data:

      APPLICANT NAME                    APPLICATION        REQUESTED  

                                       NUMBER             AMOUNT            

      ==============================    ===========    ===============   

                                                                           

      JOHN A. SMITH                      0000001111    $      1,234.00  

      /CODE

       

      Example with occasional data:

      CO-APPLICANT NAME                 APPLICATION        REQUESTED  

      APPLICANT NAME                 NUMBER         AMOUNT            

      ==============================    ===========    ===============   

                                                                           

      MARY B. JONES

      JOHN A. SMITH                      0000001111    $      1,234.00   

       

      /CODE

      I am able to define the Detail and Append templates so that the Applicant Name, Co-Applicant Name, Application Number, and Requested Amount field values are captured. However, I cannot figure out how to modify the Append template so that I don't have the problem of "MARY B. JONES" appearing in every subsequent record that does not have the occasional data line.

       

      I hope that makes sense - I'm new to Monarch and hopefully I'm speaking everyone's language.

       

      Thanks for any suggestions.

        • Help with a Variation of the "Guru" Trap - FIRST Line of Detail is Occasional
          Grant Perkins

          Hi Marisa and welcome to the forum.

           

          That's a slightly different challenge to the norm.

           

          Two questions.

           

          1. Is the line above the 'main' detail line always blank unless there is a co-applicant?

           

          2. Can there be more than one co-applicant listed above the 'main' detail line?

           

          If the answer to 1 is YES and the answer to 2 is NO then make your detail template sample 2 lines long and indicate that you are trapping on the second line. Paint a field for any co-applicant in the first line and it will populate if anything appears there.

           

          Your detail trap will need to use something or a combination that ONLY EVER appears on the 2nd line (trap line) of the detail record.

           

          If that works you will not need the append.

           

          HTH.

           

           

          Grant

            • Help with a Variation of the "Guru" Trap - FIRST Line of Detail is Occasional
              MarisaLS _

              Grant,

               

              Thank you for your suggestion - I'm very close to having the correct data being extracted now. The only snag relates to your questions:

               

              1. Is the line above the 'main' detail line always blank unless there is a co-applicant?

               

              2. Can there be more than one co-applicant listed above the 'main' detail line?

              /QUOTE

               

              Unfortunately, the answer to question 1 is NO (not always). So now I have some CoapplicantName values being ignored as expected, and some being captured as "==============="

               

              I figured I could just rename the CoapplicantName field to "CapturedCoapplicantName" and then create a calculated field for the "final" CoapplicantName value that ignores any "=" characters. (I tried the NOT trap but it didn't work since I'm trapping on the 2nd line).

               

              If you have a cleaner suggestion for how I can prevent trapping strings comprised of "=" characters, I'd appreciate it. If not, the calculated field approach should work for this report.

               

              Thanks again!

                • Help with a Variation of the "Guru" Trap - FIRST Line of Detail is Occasional
                  Grant Perkins

                  Hi Marisa,

                   

                  Ok, that's a shame but, so long as you only ever get an empty field or "==========" (etc.) I would count that as a result and your secondary calculated field to tidy up the "====" is the way I would go.

                   

                  I can't think of anything cleaner at the moment. IMO anything where the computer is rapidly doing the work for me is very clean indeed! 

                   

                  Sounds like good work to me. For someone new to Monarch you seem to have learned the more specific parts of the 'language' very quickly! Well done and keep up the good work.

                   

                  Remember that being inquisitive and simply trying things to see if they work is quite quick, relatively painless and usually very beneficial one way or another. It's also a great way to work with Monarch as you develop you experience in a way that should make your work easier.

                   

                  Above all, have fun.

                   

                   

                   

                  Grant