ecm:concat
    • 1 Minute to read
    • Dark
      Light

    ecm:concat

    • Dark
      Light

    Article summary

    The function ecm:concat concatenates the specified string values. The value returned is a string data type.

    Example

    Values stored in a group attribute represent prices for accommodations in various cities. Prices are saved as fractional numbers to two decimal places. When the price of a hotel in London is inserted into a message, the decimal values are replaced with a dash and preceded by the pound sign (i.e. 255.85 is converted to £255.-). The function fn:substringBefore extracts the value before the decimal point from the attribute ​Rate_London​ as follows:

    ${fn:substringBefore(group.CustomAttribute['Rate_London'], '.')}

    The currency symbol and dash are added to the result using the function ecm:concat. The expression for adding the special characters and inserting the extracted value into a message is constructed as follows:

    <%${ecm:concat('£', fn:substringBefore(group.CustomAttribute['Rate_London'], '.'), '.-')}%>

    Structure​

    ecm:concat(string...)

    Parameters​

    Parameter

    Description

    string

    Specifies the target string to concatenate. Additional target strings are added as a list, separated by commas.


    Was this article helpful?

    What's Next