Brian Dunning's FileMaker Custom Functions

TrimWithin ( OriginalValue )

Trims leading and trailing carriage returns as well as unnecessary carriage returns present between values in carriage return separated text.

  Average rating: 5.0 (1 vote) Log in to vote

Bradley Gallavin   Bradley Gallavin - Show more from this author
Decent Group
https://www.decentgroup.co.uk

  Sample input:
TrimWithin ( "¶¶Value1¶¶¶¶¶¶Value2¶Value3¶¶¶Value4¶¶¶¶¶" )
  Sample output:
"Value1¶Value2¶Value3¶Value4"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function takes in carriage return separated values and returns the same list after removing any unnecessary carriage returns from the beginning, middle or end of the original value supplied.

For example:

Supplying the function with the following value:
"
John


Jack

Joe
Josh

"


Will be returned as:
"John
Jack
Joe
Josh"

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 21 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: