7 Replies Latest reply on Mar 20, 2017 12:10 AM by thangam

    Removing Carriage Return at the end of each line

    Gabriel

      Title

      Removing Carriage Return at the end of each line

      Post

      Hi, I am using the BPS Email app to send emails, but I noticed that the email Filemaker leaves in my Entourage Drafts folder has a Line Feed or Carriage Return character at the end of each line. This of course makes for bad formatting, as the Carriage Return should only be at the end of each paragraph. How do I achieve that? Thanks! Gabriel

        • 1. Re: Removing Carriage Return at the end of each line
          philmodjunk
            

          Here's a simple method, but can't tell you exactly how to implement it in your solution without knowing more about it:

           

          The following expression removes all carriage returns from any point in the email address:

           

          Substitute ( YourEmailField ; "¶" ; "" )

           

          You could put this in as a calculation field, an auto-entered calculation or as part of a Set Field or Set Variable step in a script. Which method is best, depends on your database design.

           

          Note: if this is a list of email addresses, you can change "" to ";" or "," to add a delimitter for separating your addresses.

          • 2. Re: Removing Carriage Return at the end of each line
            Gabriel
               Thanks. The trouble with that solution is that it removes all the Carriage Returns, and I need them between paragraphs. But the main trouble is that the text in Filemaker looks OK, i.e. if I copy and paste it in Word I can see the CRs are only between paragraphs, where they should be. Only when Filemaker places the sent email in my email client's drafts folder after I press the "Send Email" button every line of the email has a CR at the end.
            • 3. Re: Removing Carriage Return at the end of each line
              philmodjunk
                

              Is this the email message or the address?

               

              Do you see this return in a text field in Filemaker or only in the email generated by your email server in response to Filemaker's "Send Mail" script step?

              • 4. Re: Removing Carriage Return at the end of each line
                Gabriel
                   The Carriage Return is inserted at the end of each line in the email's body. The same text in Filemaker's text field only has them between paragraphs (as it should be). I'm seeing this problem before the email goes through an email server: Filemaker uses the "Send mail" command and places the email in Entourage, my email client's drafts folder. So, either Filemaker is adding all those carriage returns when it "exports" the email to Entourage, or Entourage is somehow inserting them when it gets the message from Filemaker (unlikely, in my opinion). 
                • 5. Re: Removing Carriage Return at the end of each line
                  alangodfrey

                  "The Carriage Return is inserted at the end of each line in the email's body."

                  "Filemaker's text field only has them between paragraphs"

                  What constitutes the 'end of a line' in the Filemaker text, if it isn't a carriage return?

                  • 6. Re: Removing Carriage Return at the end of each line
                    beverly

                    "end of each" line as OP describes seems to be something that the email client is adding (if you have a setting that limits to say 80 character per 'line'). The "end of each paragraph" should be Carriage Return, although I've seem some apps (not just email) convert to LF (line feed) or CRLF (carriage return AND linefeed) by default depending on the app. But those should only be where you put the pilcrow ("¶") or Char(13) in a calculated field (or pressed the enter/return key while typing in TEXT field).

                    beverly

                    • 7. Re: Removing Carriage Return at the end of each line
                      thangam

                      Hi Gabriel,

                       

                      Can you use this function, in this function should be remove carriage return

                       

                      Substitute ( Text ; "¶"&" " ; "" )

                       

                      Thanks

                      Thangam

                      1 of 1 people found this helpful