Function Reference > Functions > %OPR_CONCATDELIM%
  

%OPR_CONCATDELIM%

Uses the CONCAT function and expands an expression in an expression macro to concatenate multiple fields, and adds a comma delimiter. %OPR_CONCATDELIM% converts all data to text, and then concatenates the fields.

Syntax

%OPR_CONCATDELIM[ macro_input_field ]%
The following table describes the argument for this function:
Argument
Required/
Optional
Description
macro_input _field
Required
Any datatype except Binary. You can use a set of incoming fields or a set of constants. You can enter a macro input field or an expression that includes at least one macro input field.

Return Value

String.
Returns NULL if all strings are null. Otherwise, ignores the null values and concatenates the strings that are not null.
If all strings in the set are NULL, %OPR_CONCATDELIM% returns NULL.

Example

The macro input field %Address% contains the following fields:
City, State, Zip
The following expression concatenates the fields in %Address% and adds a comma between fields:
%OPR_CONCATDELIM[ %Address% ]%
%OPR_CONCAT_DELIM% concatenates the following address fields into one return value:
CITY
STATE
ZIP
RETURN VALUE
Reston
VA
20190
Reston,VA,20190
Maywood
IL
NULL
Maywood,IL
Eagle River
AK
99577
Eagle River,AK,99577
St. Louis
MO
63110
St. Louis,MO,63110
NULL
NULL
NULL
NULL