7 Replies Latest reply: May 15, 2014 9:56 AM by Beverly _ RSS

    Postal Trap

    Beverly _

      Hi-

       

      I am trying to trap addresses which are sometimes 3 lines and sometimes 4 lines.  The report is roughly as follows:

       

      1st line--text that is not part of the address

      2-4th or 5th line= address block

       

                    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                       XXXXXXXXXXXXXXXXXX

                       XXXXXXXXXXXXXXXXXX

                       XXXXXXXXXXXXXXXXXX

                       XXXXXXXXXXXXXXXXXX

      As you can see, the first line of other text always starts about 3 characters before the address block.  When I try to trap the address block only, it traps the 4-liners fine, but but it picks up the top line of other text with all addresses that are only 3-lines.  Can you help me ASAP?

       

      Thanks much.

       

      Beverly

        • Postal Trap
          Grant Perkins

          Originally posted by Beverly:

          [font="courier"]              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

                           XXXXXXXXXXXXXXXXXX

                           XXXXXXXXXXXXXXXXXX

                           XXXXXXXXXXXXXXXXXX

                           XXXXXXXXXXXXXXXXXX[/font][/quote][/b][/quote]Hi Beverly,

           

          Sounds like you can pick the start of the address block OK but not the end. Is that about right?

           

          I think the solution may be a multiline field (are you using that or creating 4 address line fields separately?) which will END according to an END rule defined in the Advanced Properties of the field. If you have something suitable to identify an END then the number of lines can be a variable between 1 and a much bigger number!

           

          I guess it will be easier to explain (if I need to - you may already have the knowledge) knowing whether you have an understanding from previous experience of multi-line fields AND what the line or lines AFTER the address block look like. (We need to identify a way to tell Monarch that the multiline field has ended.)

           

          It should be quite straightforward - but then again sometimes it is not even close to be so!

           

          So, how are you setting up the address block (I assume you are using the address block functionality rather than a postal trap?) and what follows it? We should be able to come up with a solution from there.

           

          Grant

          • Postal Trap
            Beverly _

            Wow Grant!  Thanks for such a quick reply.

             

            I was trying to make a postal code trap which wasn't working.  So I went to the address block option as you suggested.  I have looked at the advanced properties, but I am not sure how to define the END rule.  The report repeats as follows:

             

                 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                 XXXXXXXXXXXXXXXXXX                     

              XXXXXXXXXXXXXXXXXX

              XXXXXXXXXXXXXXXXXX                  

              XXXXXXXXXXXXXXXXXX

            XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                  XXXXXXXXXXXXXXXXXX

              XXXXXXXXXXXXXXXXXX       

              XXXXXXXXXXXXXXXXXX                  

              XXXXXXXXXXXXXXXXX

             

            Although the above is not quite accurate because there are more text fields on the top line.   The 3 or 4 lines below of address are the only text on the 3rd and 4th lines.  I will keep struggling with figuring out how to define the END rule.  If you have any further suggestions, I would welcome them.

             

            Thanks again.

            Beverly

            • Postal Trap
              Beverly _

              OK Glenn.

               

              I select the 1st line of a 4-line address example.  I hilight the longest line that would apply to any of the address lines.

              I trap it.

               

              I go to the advanced properties and select MEMO and End= None of the above.  When I do that in the report view, everything is selected that I want--both 3 and 4 lines.  But when I go to the TABLE view, I see only the last line of the address which is city, state, and zip.  It doesn't capture the name or street address line.  Maybe I don't understand address block well enough or capturing memo fields.  Have I stated this in a way that makes any sense?

               

              --Beverly

              • Postal Trap
                Grant Perkins

                Hi Beverly,

                 

                Extracting the field with multiple and variable lines is half of what you need to do and it seems like you have success in that.

                 

                The Address Block feature simply uses that field (and any others you might have which relate to part of the address but in this case there don't seem to be any as I understand it).

                 

                The address block Wizard wants to know which fields to use and which address type lines you want from the field(s). Also which standardised address formats you want it to look for.

                 

                When it finds an identifiable line  - city, state, and zip for example it 'understands' that it the rules have been followed it can extract the City, State and Zip codes into separate fields if you tick those boxes.

                 

                The Line after the Zip is likely to be Country if the format is standardised.

                 

                The lines above City (A variable number) will be allocated to Address Lines 1, 2, 3, etc. if they exist, starting from the first line and working down towards the City line.

                 

                The easiest way to see what is happening is to experiment with the wizeard and view the changes. Remember that it will be creating new fields. ALso remember that by default thise fields will be set to the maximum width a field can be and you will likely want to narrow them a lot. The Field List feature is likely to be the quickest way to adjust them all.

                 

                Your original field contianing all the address lines will remain as it was. I assume you can see all the extracted data in that field if you use the "Show Field Contents" option from the "Windows" option on the Monarch menu bar.

                 

                You could try  including the Address Block error code in your definition (maybe you already have?). Addresses are, tradiitonally, a good source of format errors    and it is always good to have something to identify existing probable errors. Bear in mind the definable rules may not always work entiely as expected.

                 

                Nevertheless if you have ticked for 2 or 3 address lines and the city, state, and postal codes as single field extractions you should see 5 or six new fields added to the data table even if they are empty for some reason.

                 

                Because of the specific nature of addresses and the Address Block internal rules its a bit difficult be specific about what to try without making use of the same input data. It sounds to me like you are almost where you need to be so maybe just a little checking around to ensure that the extraction is working as intended (the definition for the field sounds OK) and that the Address Block is creating the expected number of fields.

                 

                If both of those check out but the address data does not appear we maybe looking at something rather odd I suspect.

                 

                HTH.

                 

                 

                Grant

                • Postal Trap
                  Beverly _

                  Hi Glenn-

                   

                  I plan to print off your explanation of address blocks for further study.  I did solve my problem by selecting for my trap the 1st 2 lines (the 1st line with various data and the 2nd line which contained the first line of the address.  I then set my trap on line one which picked up each record.  I hilighted the template to grab the 2nd line field.  I then went to advanced properties of the second line field and selected - 4 lines -- this evidently picks up the succeeding lines - 3 or 4 - whichever is there.  I did not use any appends.  I then went to the TABLE view and used the ADDRESS BLOCK wizard to splice up the field that contained the entire address into the appropriate fields.

                   

                  I appreciate your help--you got me on to thinking about using the advanced feature which was key.  I also think I will benefit from learning more about addrress blocks for future use.

                   

                  Thanks again.

                   

                  -Beverly

                  • Postal Trap
                    Grant Perkins

                    Originally posted by Beverly:

                    I plan to print off your explanation of address blocks for further study. /b[/quote]I think the internal Help information is worthy of study but I doubt my outline is !         Thanks for the comment though.  smile.gif[/img] 

                     

                     

                    Originally posted by Beverly:

                      I then went to advanced properties of the second line field and selected - 4 lines -- this evidently picks up the succeeding lines - 3 or 4 - whichever is there.   /b[/quote]Hmm. If you set the value to 4 lines Monarch will always read 4 lines.

                     

                    That may be OK if your addresses never do and never will in the future exceed 4 lines. It will work with 3 line addresses provided any 4th line would then be a blank line and not some other part of the record or, worse, the start of the next record.

                     

                    To make the field vary in length with the number of lines in the address I think you may have been right with he earlier 'None of the Above' setting (which would continue to read lines until it reached another occurrence of the template or a footer or a certain maximum number of lines). Alternatively, if your address lines do always have a blank line after them (and never one in the middle!), you could set the "End Field On" value to "Blank field values" instead. In fact a number of the options might work.

                     

                    With addresses the variable solution is usually the safer option I find.

                     

                    HTH.

                     

                     

                    Grant

                    • Postal Trap
                      Beverly _

                      Hi Glenn-

                       

                      I am mystified as to why my method works since there are no blank lines between records.  I have done a thorough reality-check and the 4-line designation in the advanced properties field option picks up the 3-liners and 4-liners appropriately.  Yes, if there were more than 4 lines, I would be in trouble.

                       

                      Perhaps fitting everything into one single template (detail) made the difference.

                       

                      Before I got this working, the IS people said they would insert a blank line between records, so I will be re-doing this using the END with blank line option which will be more reliable. 

                       

                      Again, thanks for all your help.