NormaliseSpace ( string ; removeReturns )
Text function to reduce all multiple spaces and returns
Average rating: 4.3 (35 votes) Log in to vote
Tim Mansour - Show more from this author |
chicken thighs
green olives " , true )
chicken thighs
green olives
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
I wrote this originally to clean up user-input text to remove all unnecessary space, but have also found it useful to create consistent value lists.
Cleans up a text field by reducing all multiple spaces and returns; if removeReturns is true it removes all returns by converting them to spaces before all multiple spaces are reduced to single space. Makes use of TrimAll function, and temporarily changes returns to spaces to reduce them. GOTCHA: the function relies on the temporarily-used string §%§ not being used within the text. The temp string must be set to a value that will not occur within in the field if returns are being retained.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.