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

    Preserving white space in a multiple line memo field

    MGoodell _

      I am pretty new to Monarch and these forums and am not sure if this question has been answered before, but I was not able to find a related post.

       

      I have an append template that captures multiple lines to a memo field.  When I view the report, it looks like the proper lines are being captured, but when I examine the field in the table view or export it to an Access database, all the extra spaces and carriage return/linefeed characters are stripped out.  I verified that the "Trim leading and trailing spaces..." input option is not checked.

       

      Is there anyway to preserve the proper spacing and lines of the information I am capturing?

       

      Thank-you for your assistance.

        • Preserving white space in a multiple line memo field
          Data Kruncher

          Hello MGoodell. Welcome to the forum!

           

          Assuming a Memo field simply named A, you can preserve the original white space, but you'll need to employ a calculated field (Memo type field) to do so.

           

          IF A was a 10 line field, the expression of your calculated field would be:

           

          [SIZE=2]

          textline(A,1)chr(13)

          textline(A,2)chr(13)

          textline(A,3)chr(13)

          textline(A,4)chr(13)

          textline(A,5)chr(13)

          textline(A,6)chr(13)

          textline(A,7)chr(13)

          textline(A,8)chr(13)

          textline(A,9)chr(13)

          textline(A,10)

          /SIZE[/CODE]

           

          The Textline line function retrieves the contents of the specified line number of the source field, and the Chr(13) provides the hard return that you need to preserve the original layout.

           

          HTH,

          Kruncher

            • Preserving white space in a multiple line memo field
              MGoodell _

              Kruncher,

               

              Thank-you for replying so quickly.  I now have the output I was looking for.

               

              I had tried something similar, but used chr(10) instead.  That resulted in a field exhibiting the same behavior as the original memo.  All in all it's a bit confusing.  I understand why in some instances it would be nice to "consolidate" the information captured in the memo, but would be convenient (and less confusing) to have the option to turn that off.  At the very least the behavior should be clearly documented.

               

              Thanks again!

               

              MGoodell

                • Preserving white space in a multiple line memo field
                  Grant Perkins

                  All in all it's a bit confusing. I understand why in some instances it would be nice to "consolidate" the information captured in the memo, but would be convenient (and less confusing) to have the option to turn that off. /quote

                   

                  As I recall there was quite a lively debate about this around the time of V6 and I think it drifted into a decision that, broadly, resulted in what we now have from V7 onwards.

                   

                  Perhaps it is time to have that discussion again?

                   

                   

                  Grant