Brian Dunning's FileMaker Custom Functions

TrimSpacesAndTabs ( text )

trims leading/trailing spaces and tabs

  Average rating: 4.4 (32 votes) Log in to vote

Joe Rovang   Joe Rovang

Share on Facebook Share on Twitter

  Sample input:
TrimSpacesAndTabs ( Char ( 9 ) & "sample text " )
  Sample output:
"sample text"

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

This function is an enhanced version of the native Trim() function; it trims not only leading/trailing spaces, but tabs as well.



Eric   Eric, SJSU
May 22, 2015
Appreciate having this worked out. :-)

Went through the logic, and it makes sense to me - find non-space non-tab endpoints and extract middle of string based on those.

Haven't looked at edge cases yet.

Had to add a closing paren for the If statement to get custom function to save.

Working fine in my particular application now.

Many Thanks!

Log in to post comments.


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

Under construction. Email me your wish list for improvements.