Manage Learn to apply best practices and optimize your operations.

Trimming Carriage Returns From Text Fields

In Notes V2, the @Trim function would eliminate all white space including
carriage returns. This stopped working in Notes V3. Frequently, the developer
needs to ensure that short descriptive text phrases do not have these carriage
returns. The following input translation formula is a work-around for the old
version of @Trim.

Input Translation Formula for a field called Subject

@Trim(@If(@Contains(Subject; @Char(0)); @Left(Subject; @Char(0)) + " " +
@Right(Subject; @Char(0)); Subject))

Andre Guirard (Systems Consulting Group) notes,
In Notes V2, the @Trim function would eliminate all white space including
carriage returns. This stopped working in Notes V3. Frequently, the developer
needs to ensure that short descriptive text phrases do not have these carriage
returns. The following input translation formula is a work-around for the old
version of @Trim.

Input Translation Formula for a field called Subject

@Trim(@If(@Contains(Subject; @Char(0)); @Left(Subject; @Char(0))
+ " " + @Right(Subject; @Char(0)); Subject))

The problem is that this only works if the field contains no more than one
newline character. A better way is as follows:

@Trim(@ReplaceSubstring(Subject; @NewLine; " "))
Input Translation Formula for a field called Subject

@Trim(@If(@Contains(Subject; @Char(0)); @Left(Subject; @Char(0)) + " " +
@Right(Subject; @Char(0)); Subject))

Dig Deeper on Domino Resources - Part 7

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close