The REPLACE merge field prefix lets you replace one value for another. For example, you can replace new line characters in an address field with commas. This is also useful in displaying the values from a multi-select picklist field in a more attractive manner than the default, semi-colon delimiter.

REPLACE
Syntax{{REPLACE:FieldName:{FromValue}:{ToValue} }}
ValuesFieldName is the name of the field from the Template Builder window.

{FromValue} is the aspect of the FieldName that you want to alter.

{ToValue} is what you want to change the FromValue to instead.

NotesA space is needed between the field and the end braces “} }}”.


Supported FromValue and ToValue entries:

  • {COLON}
  • {COMMA}
  • {NEWLINE}
  • {PERIOD}
  • {SEMICOLON}
  • {SPACE}
  • Literal Text

The FromValue and ToValue entries are literal text and the curly braces surrounding them need to be included. You can use Traditional Merge fields.

To end the ToValue with a space, use {SPACE}.

Usage{{REPLACE:ACCOUNT_FULLADDRESS:{NEWLINE}:{COMMA}{SPACE} }}

Replaces NEW LINE characters in the Full Address field with ", " (a COMMA and a SPACE).

2655 Midway Blvd.

Broomfield, CO 80023

becomes

2655 Midway Blvd.

Broomfield, CO 80023

{{REPLACE:ACCOUNT_FAVORITE_FLAVORS:{SEMICOLON}:{COMMA}{SPACE} }}

Replaces ";" (SEMICOLONS) in the multi-value picklist field with ", " (a COMMA and a SPACE).

Chocolate;Vanilla;Strawberry

becomes

Chocolate, Vanilla, Strawberry


{{REPLACE:ACCOUNT_FULLADDRESS:CO:Colorado}}

Replaces literal text with a new literal text value.

2655 Midway Blvd. Broomfield, CO 80023

becomes

2655 Midway Blvd. Broomfield, Colorado 80023