TextClean ( someText ; options )
Returns the text, stripped of leading/trailing whitespace and removing specified text/font formatting.
Be the first to rate this function Log in to vote
| Dan Shockley - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Returns the text, stripped of leading/trailing whitespace and removing specified text/font formatting.
The 'options' param can be:
SIMPLE OPTIONs:
- ALLOW_ALL_FORMAT - Include in options to retain all text formatting (only clean up whitespace and NULL).
- ALLOW_COLOR - Include in options to retain font colors.
- ALLOW_FONT - Include in options to retain font faces. WARNING: this will usually block style removal!!
- ALLOW_SIZE - Include in options to retain font sizes.
- ALLOW_STYLES_ALL - Include in options to retain all font styles (but still remove color/face/size).
- ALLOW_STYLES_BY_NUM_# - Include in options to retain specified styles.
Append a number by adding the FM constants (e.g. Italic + Bold)
See constants at: https://help.claris.com/en/pro-help/content/textstyleremove.html
WARNING: if you use ALLOW_FONT, that will usually (always?) prevent this function from removing Italic and Bold styles (and possibly Condensed et al - anything with a font-face), since FileMaker usually does that kind of styling by silently/secretly changing the font-face.
REQUIRES:
SuperTrim, by Debi Fuchs: https://www.briandunning.com/cf/904
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.