Skip to main content Link Search Menu Expand Document Toggle dark mode Copy Code (external link)

concat() : Concatenate Strings

Concatenate multiple strings into one.


On this page

Signature

concat(str1, str2, str3, ...)

Parameters

Parameter Type Required Description
str1, str2, ... String Yes Strings to concatenate (variable number)

Returns

Type: String

All input strings joined together.


Examples

Basic Concatenation

{{concat('Hello', ' ', 'World')}}
<!-- Output: Hello World -->

With Variables

<p>{{concat(model.firstName, ' ', model.lastName)}}</p>

Data:

doc.Params["model"] = new {
    firstName = "John",
    lastName = "Doe"
};

Output:

<p>John Doe</p>

Multiple Values

{{concat('Order #', model.orderNumber, ' - ', model.status)}}
<!-- Output: Order #12345 - Shipped -->

With Formatting

{{concat('Total: ', format(model.total, 'C2'))}}
<!-- Output: Total: $99.99 -->

In Log Statement

{{log concat('Processing order ', model.id)}}

Notes

  • Null values are treated as empty strings
  • Non-string values are converted to strings
  • Empty strings are preserved
  • More efficient than multiple + operations for many strings

See Also