3 Replies Latest reply on Mar 9, 2016 2:51 PM by HB

    Line feeds in email body


      Please help me use data from a field into the main body of an email using line feeds.


      My text Field (BR_LiveGlobals::BR_InvoiceEmailContentsAll) which received input via a dialog box contains data like:


      Thank You¶¶Brian¶Company¶664 Riverde Dr.¶City


      In the email body:


      Cust Num::NameFirst & " " &

        " " & Cust Num::NameLast & "¶¶"

      & BR_LiveGlobals::BR_InvoiceEmailContentsAll




      What appears in email message:


      Bob Jones


      Thank You¶¶Brian¶Company¶664 Riverde Dr.¶City




      What I would like to appear:


      Bob Jones


      Thank You




      664 Riverde Dr.


        • 1. Re: Line feeds in email body



          Cust Num::NameFirst & " " &

            " " & Cust Num::NameLast & "¶¶"

          & BR_LiveGlobals::BR_InvoiceEmailContentsAll



          The above will give you two spaces after the first name. Remove one of the |& " "| areas. Don't put quotation marks around the two return characters.


          There are actual pilcrow characters (the carriage returns) in your field. Try wrapping BR_LiveGlobals::BR_InvoiceEmailContentsAll with a substitute:


          Substitute ( BR_LiveGlobals::BR_InvoiceEmailContentsAll ; "" ; "<br/>" )


          That'll use the HTML equivalent of a carriage return. Sometimes Mail and/or Outlook will remove extra carriage returns if you use more than one in a row, so the HTML version can help preserve the formatting you want.



          • 2. Re: Line feeds in email body

            Try this:



            i1 = trim(substitute(Cust Num::NameFirst ;"";""));

            i2 = trim(substitute(Cust Num::NameLast ;"";""));

            i3 = trim(BR_LiveGlobals::BR_InvoiceEmailContentsAll)

            ];//end let variables

            i1 & " " & i2 & "¶¶" & "Thank you" & "¶¶"i3

            )//end let


            If you still get unexpected output, make sure the ¶ that is being used both in this calc and in your BR_InvoiceEmailContentsAll field is the native pilcrow character that you can select directly from the filemaker calculation dialog.


            - The trim function just removes leading and trailing spaces from the data supplied to keep your visual output consistent.

            • 3. Re: Line feeds in email body

              What I used was:

              Substitute(BR_LiveGlobals::BR_SignatureTextLongSet ;Char(182);¶)


              did the trick