How do you remove a "@newline" from a plain text field entry

In a translation formula for a text field, I want to remove any @char(13) or paragraph breaks. @replacesubstring does not work.

Subject: How do you remove a “@newline” from a plain text field entry

You actually use “@newline” in the code, not @char(10)

The Notes Help even says:

Tip Use @ReplaceSubString to remove carriage returns from text by replacing them with " " or “.”

It does work with @NewLine.

Subject: RE: How do you remove a “@newline” from a plain text field entry

Thanks… I must have had a typo before, because I started out trying it the way you suggest…

Spelled correctly etc… it works

Subject: RE: How do you remove a “@newline” from a plain text field entry

Just in case someone else reads this looking for an answer, a good way to strip multiple newlines is the translation formula:

vTmp:=@Trim(@ThisValue);

@While(@Left(vTmp; 1)=@NewLine | @Left(vTmp; 1) = " "; @Set(“vTmp”; @RightBack(vTmp; 1)));

@While(@Right(vTmp; 1)=@NewLine|@Right(vTmp; 1) = " "; @Set(“vTmp”; @LeftBack(vTmp; 1)));

vTmp

You could just strip all @NewLine with an @ReplaceSubstring, but that will stip all @Newline characters in the text, not “Trim” them from both ends.

I’m checking for spaces too, just in case there is some user that puts in @NewLine (space) @NewLine- if you don’t strip spaces in this scenario, a single space would halt the @While loop.

Subject: RE: How do you remove a “@newline” from a plain text field entry

What about @Trim?