Jump to content
Server Maintenance This Week. ×

Removing Blank/Carriage return Lines from text


This topic is 3104 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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
Link to comment
Share on other sites

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
)

Link to comment
Share on other sites

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:

  • Like 1
Link to comment
Share on other sites

This topic is 3104 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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