4 Replies Latest reply: May 15, 2014 10:11 AM by Olly Bond RSS

    model question

    monarchman7 _

      Hi, I just have a question about how to create a model for the following type (unfortunately I can't post the actual document, so it's obviously just a mock report):


      dfhjdf dsakjadsknj dsnj                ....zzv........

      sdnadmn dsjkskd dskmd                  pick-up1

      sdmnd sdmdskmds dsnskd


      adncjkknjc zcxkcxkmcx                  ....nop........

      cxmxcm cxcxlcx cxlcxxx                  pick-up2

      xxnzx zxzlxl zxkllzxllz                                   


      damnadcl cakmcxmckmxcxz                ....tuv.......           

      cxkmcxzkm cxmzcxkmkmzcx                pick-up3

      zcxm kxzlokzcx amcmczxm

      zxmclmx skckllxc zklxckl


      zsdndknsdskn sdkdkjskjds               ......sds.......

      dsnddsdsksd sdkds dkjskjs              pick-up4





      Here's the thing, the 7-digit numbers at the bottom go with the words above them. The words above them are paragraphs of varying lengths. I either need to pick up the paragraphs with the numbers below them in the same line, or footer the 7 digit numbers below them, which would be easy since they all begin with the same 3 numbers. I also need to pick up what goes in the "pick-up1, pick-up2, etc" slots (can't really use the line above them to help me pick up those slots). These are either words or numbers. They happen to be in the same line as the 2nd line of each respective paragraph, but they are in their own column, and they do need to be tied with the paragraphs next to them.


      So to recap: I need either 2 or 3 columns in my table. The "pick-up1" etc stuff needs its own column, and the other columns either need to be the paragraphs + the numbers below them, or the paragraphs in their own column and the numbers in their own column.


      The problem here is that neither blank field values nor end of left justification work since there are no spaces in-between and everything is left-justified.


      I have messed around with the multi column feature but have pretty much failed to use it properly for this. I have tried to start things at the "detail" and end things at the "footer" (the footer being the 7 digit numbers and the detail being the paragraphs) but the varying lengths of the paragraphs along with the 2nd column (needing the be tied in with the paragraphs) have made it difficult for me to get the desired results.


      Any help would be great on this, thanks guys.

        • model question
          Olly Bond

          Hello MonarchMan, and welcome,


          You don't need multi-column region for this, just two templates, detail and footer. I think you're almost there, and assuming that there's always some text in the paragraph, it shouldn't be too tricky.


          First, the detail trap should be a multiple line sample - two lines should be selected before clicking on Template > New Template. Trap on line 1 if you can use the ... characters reliably, or on line 2 of the sample if the pickup text is easier to use. Select as fields the first line of the paragraph, call this and define it as a Memo field, and in Advanced properties select to end the field on None of the above. It will now continue until the next instance of a template. Select the field as a Character field on line two of the sample.


          Second, the Footer template. This should be defined using a single line template sample, and you can trap using the NNN- characters (so three wildcard numeric traps followed by a literal hyphen). Define the field as a Character field, and that should be job done.


          Hope this helps,



            • model question
              monarchman7 _

              thank you, figured there was an option in monarch to work in that exact way but didn't know "none of the above" was it

                • model question
                  monarchman7 _

                  hmm, another bump in the road:


                  some of the paragraphs only take up one line (a single sentence), so the 7-digit number is on the same line as the other thing I need to pick up, I obviously can't put in a 1-liner as an example, is there any other advanced features I can use?

                    • model question
                      Olly Bond

                      Hello MonarchMan,


                      You can work around this. Make your detail template a one line sample, define the paragraph field as before (Memo, end on none of the above) and define on the first (only) line of your sample. Then double click on the properties of pickup and make this a Memo that ends on blank field values.


                      Then edit the footer template, and define a field called that handles the cases where the pickup data is on the same line as the footer. This can just be a one line Character field.


                      Then in the Table window, define a new Calculated Field (formula based, type Character) with the expression:


                      if(len(pickup2)>0;pickup2;rsplit(pickup1;2;" ";1))[/CODE]


                      This tells Monarch to check the length of pickup2. If this is greater than zero, (which will only be the case if the paragraph has one line and so the pickup data on the footer line is present), then use the content of pickup2, else take the whole memo field pickup1, split it into two, from the right (rsplit), breaking it on the space " " character, and return the 1st (rightmost) segment.


                      It works for me on your sample in 10.5 Pro - if you'd like a model sent over please drop me an email.


                      Best wishes,