The REPLACE() function replaces part of a string based on a position and a length, and returns text. It is useful for modifying a specific segment of a text.
The output type format of the result is configured in the output field options of the formula editor: see Formula column.
Syntax
REPLACE(text, start_position, number_of_characters, new_text)
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
Replace the first 4 characters
"TimeTonic" becomes "DemoTonic".
REPLACE("TimeTonic", 1, 4, "Demo")
If start_position exceeds the length of the string, no replacement is performed. If number_of_characters is zero, the text is inserted without removing anything.
Business use case: REPLACE() is particularly useful for cleaning up data entered by users or imported from external sources (API, CSV, forms).
Best practice: before any automation scenario or comparison, it is recommended to normalize your data (spaces, special characters, separators) using REPLACE(), SUBSTITUTE(), TRIM() or UPPER().
Business use case: REPLACE() is particularly useful for cleaning up data entered by users or imported from external sources (API, CSV, forms).
Best practice: before any automation scenario or comparison, it is recommended to normalize your data (spaces, special characters, separators) using REPLACE(), SUBSTITUTE(), TRIM() or UPPER().
Go further
SUBSTITUTE
Replace all occurrences of one text with another.
Or continue with
Formula glossary
All available operators and functions, organized by category.