The replace helper substitutes all occurrences of a specified substring in a field with a new value. Use it for simple, exact string replacements such as updating keywords, standardizing text, or removing known characters.
Syntax
{{replace field oldSubstring newSubstring}}
field -- The string or field to modify. Required.
oldSubstring -- The text to find. Required. Matching is case-sensitive.
newSubstring -- The text to substitute for each match. Required. Pass "" to delete all occurrences of oldSubstring.
Examples
Replace a character with a word
{{replace record.cases "&" "and"}}
Input: record.cases is "these & those & some other cases"
Output: these and those and some other cases
Replace one word with another
{{replace record.description "Shoes" "Boots"}}
Input: record.description is "Shoes"
Output: Boots
Return raw output with triple braces
{{{replace record.details ":" "="}}}
Replaces all colons with equals signs and returns the result without Celigo's automatic formatting.
Usage notes
- All occurrences of
oldSubstringare replaced, not just the first. - Matching is case-sensitive:
"Shoes"and"shoes"are treated as different substrings. - Pass
""asnewSubstringto delete all occurrences ofoldSubstring. - For pattern-based replacements (partial words, optional characters, character classes), use the regexReplace helper instead.
- Use triple braces (
{{{ }}}) for raw output and double braces ({{ }}) when Celigo's default formatting is acceptable.