The TRIM() function removes unnecessary spaces from a string while keeping a single space between words: it removes leading and trailing spaces and reduces consecutive spaces in the middle to a single space. It returns a text string.
The output format of the result is configured in the output field options of the formula editor: see Formula column.
Syntax
TRIM(texte)
How to reference parameters in TimeTonic: $field_name for a field (link, linked-table column, number, selection, formula, text); "free text" in quotes; no quotes for numbers.
Parameters
Example
Remove unnecessary spaces from a text
" Bonjour le monde " becomes "Bonjour le monde".
TRIM(" Bonjour le monde ")
TRIM() leaves a single space between words and removes leading and trailing spaces.
Best practice: invisible spaces at the beginning or end of a text are a frequent source of errors in comparisons, conditions and automation scenarios. It is recommended to use TRIM() before any text comparison.
Best practice: invisible spaces at the beginning or end of a text are a frequent source of errors in comparisons, conditions and automation scenarios. It is recommended to use TRIM() before any text comparison.
Go further
LENGTH()
Returns the number of characters in a text string.
Or continue with
Formula glossary
All available operators and functions, sorted by category.