3 Replies Latest reply: May 15, 2014 9:59 AM by Grant Perkins RSS

    Trap help!

    Wayne _

      I have the following report that I am having trouble with the traps.  I can trap the information on each line correctly but I am having problems trapping the comments.  I only want the comments to appear on the lines that the comments apply to.  When I trap the comments as a separate trap it fills in the same comment on multiple lines.  I have also tried multi-line traps but I couldn't get that to work either.  Can someone help me please.  Thanks

      48         06-JAN-06  2393824     BF10131AA-D4        IMPELLER  C100-400               1        1                                                                               

      48         13-JAN-06  2388312     BF10079AA-4408      IMPELLER  B40-3150               1        1                                                                               

      D1         07-OCT-05  2186456     DY23702A-DU6        CASING    3X2E-10 3X2P-10        10       9        MS         IN 787             

                                                            (DY23702A    FD  DU6)                                                            

      Comments:  CASTING DP14838B-DU6 ETA DATE 10/4/05 FROM IPP                                                                               

      AS OF 9/15 RESCHEDULED SHIP 10/13 FROM IPP ETA 10/17                                                                               

      10 CASTINGS SHIPPED FROM IPP 10/21 - ETA 10/24.  10 PCS SENT TO 787 DEPT FOR MACHINING 10/24.                                                                               

      D1         12-OCT-05  2081600     DY29455A-DU6        COVER     REAR 4X3E-10 W/TAP 5   6        6        MS         IN 787             

                                                            (DY29455A    FD  DU6)                                                            

      Comments:  CASTING DP29455A-DU6 ETA 10/4 FROM IPP                                                                               

      AS OF 9/15 ... SCHEDULED SHIP STILL 9/29 ETA 10/4 FROM IPP                                                                  

                 SCHEDULED SHIP 5 PCS 10/21 FROM IPP ETA 10/24                                                                               

      1 MORE PC SHIPPED FROM IPP 10/24 ETA 10/26                                                                               

      5 PCS SENT TO 787 DEPT ON 10/24 FOR MACHINING                                                                               

      1 MORE PC WILL BE SENT TO 787 DEPT ON 10/26 FOR MACHINING.  ORDER INCREASED TO 6 PCS.

        • Trap help!
          Grant Perkins

          Originally posted by Wayne:

          I have the following report that I am having trouble with the traps.  I can trap the information on each line correctly but I am having problems trapping the comments.  I only want the comments to appear on the lines that the comments apply to.  When I trap the comments as a separate trap it fills in the same comment on multiple lines.  I have also tried multi-line traps but I couldn't get that to work either.  Can someone help me please.  Thanks

          [font="courier"]48         06-JAN-06  2393824     BF10131AA-D4        IMPELLER  C100-400               1        1                                                                               

          48         13-JAN-06  2388312     BF10079AA-4408      IMPELLER  B40-3150               1        1                                                                               

          D1         07-OCT-05  2186456     DY23702A-DU6        CASING    3X2E-10 3X2P-10        10       9        MS         IN 787             

                                                                (DY23702A    FD  DU6)                                                            

          Comments:  CASTING DP14838B-DU6 ETA DATE 10/4/05 FROM IPP                                                                               

          AS OF 9/15 RESCHEDULED SHIP 10/13 FROM IPP ETA 10/17                                                                               

          10 CASTINGS SHIPPED FROM IPP 10/21 - ETA 10/24.  10 PCS SENT TO 787 DEPT FOR MACHINING 10/24.                                                                               

          D1         12-OCT-05  2081600     DY29455A-DU6        COVER     REAR 4X3E-10 W/TAP 5   6        6        MS         IN 787             

                                                                (DY29455A    FD  DU6)                                                            

          Comments:  CASTING DP29455A-DU6 ETA 10/4 FROM IPP                                                                               

          AS OF 9/15 ... SCHEDULED SHIP STILL 9/29 ETA 10/4 FROM IPP                                                                  

                     SCHEDULED SHIP 5 PCS 10/21 FROM IPP ETA 10/24                                                                               

          1 MORE PC SHIPPED FROM IPP 10/24 ETA 10/26                                                                               

          5 PCS SENT TO 787 DEPT ON 10/24 FOR MACHINING                                                                               

          1 MORE PC WILL BE SENT TO 787 DEPT ON 10/26 FOR MACHINING.  ORDER INCREASED TO 6 PCS. /font[/quote][/b][/quote]Wayne,

           

          I think the multi-line trap is the right way to go BUT the occasional apearance of a second line with information in brackets may be a problem for my normal solution for this sort of problem. Is the info in brackets, when it appears, also required? If so how does it relate to the information on the line above? (I'm going to guess that the answer, in terms of a multi-line field, is 'not too well'.)

           

          You seem to have only 2 template sample lines to play with (the least number of rows, including any empty rows, for a detail record.)

           

          So at first sight you can EITHER have a field for the info in brackets OR for the 'Comments:' section.

           

          For the Comments: try this, we will worry about the other line later.

           

          Make a 2 line sample for the template. Map the field you want from the first line.

           

          On the second line paint a field from the column where the comments usually start as wide as it needs to be to capture any text. (Call it "Comments" ?)

           

          Go into the field properties (not sure which version of Monarch you have - the principle is the same on different versions but the terminology is slightly different on older versions), pick the advanced tab and set the 'Start Field on' value to Preceding String with the text 'comments'.

           

          Pick an 'End field on' that ensures you get all the lines you need (try the different settings to see the effects.) It may well be that you need the 'None of the Above' option.

           

          What should then happen is that every record will have a Comments field but only records with a real comments entry will have the field populated.

           

          See what that does for you. Let us know about the data in brackets.

           

          HTH.

           

          Grant

          • Trap help!
            Wayne _

            Thanks Grant.  It worked perfectly.  The info in brackets is wrap from the description.  Not critical but I was able to capture it by trying different advanced settings.  Thanks for the help.

            • Trap help!
              Grant Perkins

              Originally posted by Wayne:

              The info in brackets is wrap from the description.  Not critical but I was able to capture it by trying different advanced settings.  /b[/quote]Excellent!

               

              I thought the bracketed stuff would be related to the description (similar problem discussed previously on here) but was not sure how much of the first line above it was the description or could be considered to be the description. Sounds like you have the beast under control though!

               

               

              Grant.