Concatenating Strings
AMPS provides the CONCAT
function, that can be used for constructing strings. The CONCAT
function takes any number of parameters and returns a string constructed from those parameters. The function can accept both XPath identifiers and literal values.
The CONCAT
function can be used in any AMPS expression that uses a string. For example, you could CONCAT
in a filter as follows:
CONCAT(/firstName, " ", /lastName) = 'George Orwell'
CONCAT
can be combined with other expressions, including conditional expressions. A mailingAddressName
field in a view could be constructed as follows:
<Field>CONCAT(/firstName, " ", /lastName,
IF(/suffix NOT NULL, CONCAT(", ", /suffix), "") )
AS /mailingAddressName</Field>
Last updated