Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Removing Blank/Carriage return Lines from text

Featured Replies

I have a Send email script where I pass in a four parameters via a list in this order: email Address, Subject, Attachment Location, Body.

Since the email has carriage returns using

Set Variable;$parameters; Get(scriptparameter)

Set Variable $body; GetValue($parameters;4) //will only yield the first line of the body parameter.

Instead, I've use a substitute on $parameters to turn email, subject, and attachment into ""  Now I am left with 3 blank lines in body. Is there a delete line character or a way to remove the leading carriage returns from text? This is where I'm at:




Hello John:

blah blah

blah

Thank You

 

 

Edited by GisMo

There is an example of the script to send Email in the Task.fmp12 file that came with your FileMaker Application. 

Lee

  • Author

Hey Lee,

I looked at the file and it doesn't answer my question.

 

However, I did come across another thread that had a similar solution searching for "¶" which didn't work. I made some changes and this custom function works:

TrimLeadingReturns(text) 

If(
Code(Left(text; 1)) = 13;
TrimLeadingReturns(Right(text; Length(text) - 1));
text
)

I'm glad you solved your issue. However, I think what you're really looking for is a better way to pass multiple script parameters. This has been solved in various ways over the years. For example:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.