Use the replace helper to substitute all occurrences of a specified substring in a field with a new value. This is helpful for simple, exact string replacements—such as updating product names, removing certain keywords, or standardizing text in records.
{{replace field oldSubstring newSubstring}}
-
field: The field or variable whose text you want to modify (e.g.,
record.description). -
oldSubstring: The text to find in the field.
-
newSubstring: The text that replaces each occurrence of
oldSubstring.
-
Replacing ampersands with “and”
If
record.casesis"these & those & some other cases", then:{{replace record.cases "&" "and"}}yields
"these and those and some other cases". -
Updating an item’s description
If
record.descriptionis"Shoes", you can change it to"Boots":{{replace record.description "Shoes" "Boots"}}which returns
"Boots". -
Using triple braces for raw output
{{{replace record.details ":" "="}}}replaces all colons (
:) with equals signs (=) and returns the unformatted string, bypassing any automatic quoting or encoding.
Tip
-
This helper performs a straightforward, case-sensitive replacement on all occurrences of
oldSubstring. -
For more complex pattern matching (e.g., partial words, optional characters), consider using the
regexReplacehelper. -
If you want the result to be returned exactly as is—without any automatic formatting—use triple braces (
{{{ }}}).