1 Reply Latest reply: May 15, 2014 9:53 AM by Grant Perkins RSS

    Importing Multiple Variable Notelines for a detail record

    Chris Bole

      Hello All,


      I am new to learning Monarch and am having issues importing a report with multiple note lines below the detail record.


      An example of the detail format can be (with the notes after the **:

      Rec1   2222   4343

        • Dogwood

        • Prairie


      Rec2   2222   4343


      Rec3   2222   4343

        • Samson


      The issue is that I am having a difficulty importing Notes (**) as there are a variable amount of lines and sometime none.


      How can I import this so that the appropriate notes lines are imported on the correct detail record.


      Thanks for your help in advance

        • Importing Multiple Variable Notelines for a detail record
          Grant Perkins

          Hi Chris and welcome.


          There are a few way to approach this sort of problem but in my experience the best approach for each problem can be very specific to the report format you need to analyse.


          For example, do you always have at least one line, even if blank, between two detail lines which are always present? If so you can create a detial template based on a 2 line sample and set up a multi-line field on the second line. This field will sometime be blank (no comments available) and sometimes have on or more rows of comments. The comments can be left as a block of text OR separated into individual fields if required by calculated fields using the many functions available.


          A similar idea can be used where the records may have a variable number of specific fields (as opposed to text based comments) where the fields have tags associated with them and can therefore be identified using the 'preceeding string' functionality in the advanced field properties screen.


          If you are unlucky with the report and find that detail lines with no comments do not have a following blank line you may need to resort to a 2 stage process. This would probably require a Monarch Pro version for external lookup capabilities but in some cases may be practical with Standard using internal lookups.


          I stage one you would treat the commments as detail and extract the comment lines (again some choices on the best approach are likely) together with a unique key reference from their parent detail line. Exoport the result to a table to be used for a 'lookup'.


          Stage 2 would be to create a model reading just the detail lines and then add in the lookup for the comments field(s).


          Depending upon how well you can identify and extract the comments into a single field in the first stage you may need to consider exporting the first extract to a new 'report' and then working on that report to produce your lookup table. That would make it a 3 stage process.


          So, is your real report similar to your sample with at least a line between each real detail record? If so you have the easier scenario and it would be great if we could work with that!