Skip to main content
Conga Support

REPLACE in Word

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} }}

Values

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

Notes

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

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

Usage

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

This 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} }}

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

Chocolate;Vanilla;Strawberry

becomes

Chocolate, Vanilla, Strawberry

  • Was this article helpful?