Articles in this section

replace helper

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.

Usage

{{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.

Examples

  1. Replacing ampersands with “and”

    If record.cases is "these & those & some other cases", then:

    {{replace record.cases "&" "and"}}
    

    yields "these and those and some other cases".

  2. Updating an item’s description

    If record.description is "Shoes", you can change it to "Boots":

    {{replace record.description "Shoes" "Boots"}}
    

    which returns "Boots".

  3. 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 regexReplace helper.

  • If you want the result to be returned exactly as is—without any automatic formatting—use triple braces ({{{ }}}).