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

    Create a catch-all template

    drobert _

      Bellow is the report in question:

      SHIP TO  : TEST CU                                        TEST  CREDIT UNION                    PAGE:    1                       

      RUN      : 04APR09 00:06                               TELLER TRANSACTION REPORT                 FOR: 03APR09 23:59              

      REPORT # :    5                                                BOX 9999                       BRANCH: TEST CU             001    

       

      TELLER XYZ                    TELLER  1007                                                                               

      MEMBER  BR ACCOUNT  REV SC  TIME  EFDATE  ENDATE          AMOUNT          AMOUNT2          AMOUNT3          SV. CHG  SUPER ORIG

         -


        -- -


        --- --  -


        -


        -


                -


                -


                -


                -


        -


      -


       

         123456   1 C 0 REG      CK 10:03 03APR09 03APR09      150,000.00-             .00              .00             .00            

                                                 REF#      7                                                                           

         123457   1 C 0 PKG      PR 06:59 03APR09 03APR09        1,046.00              .00              .00             .00         PAYR

         123458   1 C 0 BUS      XF 11:04 03APR09 03APR09        9,702.68-             .00              .00             .00         PAP

         123459   1 C 0 BUS      XF 11:04 03APR09 03APR09       66,465.64-             .00              .00             .00         PAP

         123460   1 C 0 BUS      XF 11:04 03APR09 03APR09       11,166.60-             .00              .00             .00         PAP

         123461   1 C 0 BUS      XF 11:04 03APR09 03APR09       34,406.80-             .00              .00             .00         PAP

         123462   1 C 0 SP7      XF 11:04 03APR09 03APR09       28,613.56-             .00              .00             .00         PAP

         123463   1 C 0 PKG      XF 11:04 03APR09 03APR09           15.63-             .00              .00             .00         PAP

         123464   1 C 0 PK2      C2 09:57 03APR09 03APR09           80.00              .00              .00             .00         HBPC

      INST  123 BR   1 1234  54321                                                                               

      123465   1 C 0 GLD      WD 11:34 03APR09 03APR09          511.40-             .00              .00             .00              

                US           400.00- @ 1.2785000                                                                               

      123466   2 C 0 REG      MO 12:51 03APR09 03APR09           57.53-             .00              .00           5.00-US            

                US            40.00- @ 1.2785000 REF# 156676                                                                               

      123467   1 $            AE 10:36 03APR09 03APR09        1,272.70-             .00              .00          10.00-US             

                US         1,000.00- @ 1.2601000        US       10.00- SC @ 1.2601000                                                    

         123468   1 Y 1 RIF      TO 00:01 21JAN09 21JAN09           73.36-             .00              .00             .00         SGEN

                                                                  TAX WITH           7.34              .00                             

         123469   1 N 0 REG      HD 09:02 21JAN09 21JAN09        1,500.00              .00              .00             .00         ONUS

                                                 #REF   1950      TERM ID 0819;      00001           CARD #    2                       

                                                 HOLD ON ATM DEPOSIT                                                                   

         /code

      I defined a detail template to capture the main information and created several append templates to capture the additional information. Here are the append templates that I have created and they all work fine:

      INST line: same trap as detail and specifying " inst  " in the Preceding string[/B] option for every field.

        US line: same trap as detail and specifying "          us" in the Preceding string[/B] option for every field.

      TAX line: same trap as detail and specifying "                                                            tax with" in the Preceding string[/B] option for every field.

      /code

       

      What I want to do is create a generic template that would simply trap all other messages, like the one "HOLD ON ATM DEPOSIT", but as soon as I define an append template with the same trap line as the detail but define the Preceding string[/B] to be several spaces, not only do I capture the "HOLD ON ATM DEPOSIT" messages, but I also capture all data that I had originally captured with my previous appends and they no longer work.

       

      I must be missing something quite fundamental for this to work:o. Can anyone point me in the right direction.

        • Create a catch-all template
          Olly Bond

          Hello drobert,

           

          Have you tried making a multiline detail template, and defining all the preceding string fields in that? Get rid of the appends - it doesn't look to me like you need them.

           

          Best wishes,

           

          Olly

            • Create a catch-all template
              drobert _

              Have you tried making a multiline detail template, and defining all the preceding string fields in that? Get rid of the appends - it doesn't look to me like you need them.

              /quote

               

              OK, maybe I am missing something, but I thought that a multi line detail template would necessitate it to have the number of lines defined (ex: if defined as two lines, it would always take two lines of detail), unless there is a way to define a variable[/I] multi-line, which I am not aware of how to do that.

               

              At any rate, it would be very complicated for me to splice up the following lines as the information can be different (sometimes a TAX line with a REF line, etc) as there are additional information that I did not include in the sample report.

               

              All the original append templates work great as they have in the past, but all I needed was to add another catch-all template to get all other additional information that I may not be picking up with the appends that were defined.

                • Create a catch-all template
                  Grant Perkins

                  Daniel,

                   

                  It sounds like your Catch-all is indeed catching all which means the other traps are redundant as far as Monarch is concerned.

                   

                  You need a unique catch-all trap somehow, or more specific traps.

                   

                  Would the 'not' options in the trap line extend your wider trapping options for this report? Probably not (ouch) but maybe worth considering if you have not already done so.

                   

                   

                  HTH.

                   

                   

                  Grant

                    • Create a catch-all template
                      Olly Bond

                      Hello drobert,

                       

                      You could edit your detail template so that one field has advanced properties including "ends on 'none of the above'."

                       

                      This would create a multi-line memo field, call it "blob", from which you could use the Textline(blob;1) function to give you the main data, and then other calculated fields that would return the occasional TAX, REF etc lines.

                       

                      Best wishes,

                       

                      Olly

                        • Create a catch-all template
                          drobert _

                          Sorry for the late replies, but I have been pulled away from this project and only able to get back to this one again now.

                           

                          Would the 'not' options in the trap line extend your wider trapping options for this report?[/quote]

                          Sorry Grant, I am not sure what you mean by 'not', are you saying to define the beginning of the trap with a bunch of "ß" characters? If that's the case, then yes and this is what caused this new template to trap all the other additional lines that I previously defined.

                           

                          You could edit your detail template so that one field has advanced properties including "ends on 'none of the above'."

                           

                          This would create a multi-line memo field, call it "blob", from which you could use the Textline(blob;1) function to give you the main data, and then other calculated fields that would return the occasional TAX, REF etc lines.[/quote]

                           

                          Thanks for your input Olly. If I understand correctly, I would have to define a detail template with a single field and then cut everything up into calculated fields. If that's the case, it would be fairly lengthy process to do all that and I am not sure it would be worth the effort.

                           

                          I tried leaving my detail trap as is, delete all my append traps, change my append to catch all other information (as it did when I tried to create my catch-all trap), define the end of the trap as "non of the above" and define it as a large text field and cut up the information. This would be less intensive then to do it from the Detail level, but then i creates a new problem where the branch summary information (which the format is quite complex on its own, and I don't need any of it) gets picked up as well:rolleyes:.

                           

                          If there are no other suggestions, then I will try Olly's suggestion out, but I really thought that the Gurus out there would have had the magical answer:D. Did I stump them;).

                            • Create a catch-all template
                              Grant Perkins

                              Sorry Grant, I am not sure what you mean by 'not', are you saying to define the beginning of the trap with a bunch of "ß" characters? If that's the case, then yes and this is what caused this new template to trap all the other additional lines that I previously defined.

                               

                              /quote

                               

                              Hi Daniel,

                               

                              V10 (but not V6 if you are still using it) allows you to 'strike out' trap characters so you might be able /Ito define a trap that traps the lines you want but will exclude any similar lines that have other characters or constructs that identify them as unwanted.

                               

                              I'm not sure if it will work for you in any way at all but it is certainly worth having a quick look.

                               

                               

                              Grant

                                • Create a catch-all template
                                  drobert _

                                  Well, I revamped pretty much the whole thing other then the detail template:rolleyes:. Using a spin-off of Olly's suggestion, I created a single Append template using the Guru trap and defined a field which captures the whole line and defined it to start After last defined field in template[/B] and ending with Blank field values: 1[/B].

                                   

                                  I created multiple fields that captured the information I needed separated and all looks good:D. Defining the advanced rules as they are eliminated the problem I was having where it was also picking up summary information that is always at the end of every teller and is always separated by two blank lines.

                                    • Create a catch-all template
                                      Grant Perkins

                                      Sounds like the way to go. Your sample suggested it might be possible to INST and possibly REF# directly. Maybe also US BUT not where there are two US entries on a line ....

                                       

                                      So you end up with the block select and slice and dice routine at some point. In which case you may as well go there from the start .... probably.

                                       

                                      No firm rules for this - just have to have the techniques in your tool kit and work out what to use report by report.

                                       

                                      You got the result so that is a positive outcome.

                                       

                                       

                                      Grant.

                                        • Create a catch-all template
                                          drobert _

                                          Sounds like the way to go. Your sample suggested it might be possible to INST and possibly REF# directly.[/quote]

                                           

                                          Actually, it turned out that the end-user decided that only the Reference Number (REF#) and the Inter-Institution (INST) was required to be in fields by themselves and leave everything else in the Message field. It was even decided that I did not need to even remove the REF# nor INST info from the Message field and leave the duplication... less work for me:cool:.

                                           

                                          I thank you all for you greatly appreciated help.:D

                                            • Create a catch-all template
                                              Grant Perkins

                                              Actually, it turned out that the end-user decided that only the Reference Number (REF#) and the Inter-Institution (INST) was required to be in fields by themselves and leave everything else in the Message field. It was even decided that I did not need to even remove the REF# nor INST info from the Message field and leave the duplication... less work for me:cool:.

                                               

                                              I thank you all for you greatly appreciated help.:D[/quote]

                                               

                                              Hehe.

                                               

                                              If I had a dollar for every time a user changed their requirements for extraction after the first 'absolutely must have this ...' statement I would be able to retire comfortably.

                                               

                                              If I had $100 for every time a 'must have' needing a nifty analysis was never actually used I could probably solve the world's financial crisis ...

                                               

                                               

                                               

                                              Or more likely if people had used the analyses available to them we might not have 'enjoyed' the crisis at all.

                                               

                                              Don't you just love your 'customers'?

                                               

                                               

                                              Grant