CONCAT function

CONCAT(firstParameter, otherParameters...) CONCAT(firstParameter; otherParameters...)

firstParameter — Number, Logical, Text, Color, { Number }, { Logical }, { Text } or { Color }

The first parameter.

otherParameters — Number, Logical, Text, Color, { Number }, { Logical }, { Text } or { Color } (accepts many)

Additional parameters.

Returns — Text

A text string containing all given values in the order they are given.

Joins any number of values together as a single text string and returns it. CONCAT("te", "st")CONCAT("te"; "st") returns "test" and CONCAT("The value is: ", TextField1)CONCAT("The value is: "; TextField1) returns "The value is: ", followed by the value of the text field TextField1.

Converting numbers to text strings

If a number is given as a parameter, it is converted to a text string:

CONCAT("The value is: ", NumberField1)CONCAT("The value is: "; NumberField1)

This formula returns a value such as "The value is: 1234.56", using the decimal separator of the language the app has been configured to use. If that language is German, for instance, "The value is: 1234,56" is returned instead. Thousands separators are not used.

Determining how numbers are converted to text

To get a formatted value, respecting a field's formatting options like the use of thousands separators, use the FormattedValue property instead:

CONCAT("The value is: ", NumberField1.FormattedValue)CONCAT("The value is: "; NumberField1,FormattedValue)

This formula produces a text string like "The value is: 1,234.56" for an app set to US English, and one like "The value is: 1 234,56" for an app in German (depending on the formatting options of NumberField1).

Use any of these functions to specify formatting preferences through the formula itself:

Colors, logical values and blank values

Colors are converted to CSS color values, such as "#00ff00ff" for green with no transparency. The logical value FALSE is converted to "FALSE" and TRUE is converted to "TRUE". Blank values (including those produced by the BLANK function) are converted to "".

CONCAT versus CONCATENATE and the & operator

CONCAT is in many ways similar to CONCATENATE and the & operator. These formulas all return the same value:

CONCAT("Value: ", Field1)CONCAT("Value: "; Field1)
CONCATENATE("Value: ", Field1)CONCATENATE("Value: "; Field1)
"Value: " & Field1"Value: " & Field1

CONCAT differs from CONCATENATE and & in that it always returns a single text string, even when invoked with arrays. These two formulas both return the array { "a1", "b1" }{ "a1"; "b1" }:

CONCATENATE({ "a", "b" }, 1)CONCATENATE({ "a"; "b" }; 1)
{ "a", "b" } & 1{ "a"; "b" } & 1

However, this CONCAT formula returns "ab1":

CONCAT({ "a", "b" }, 1)CONCAT({ "a"; "b" }; 1)

These two formulas both return the array { "ac", "bd" }{ "ac"; "bd" }:

CONCATENATE({ "a", "b" }, { "c", "d" })CONCATENATE({ "a"; "b" }; { "c"; "d" })
{ "a", "b" } & { "c", "d" }{ "a"; "b" } & { "c"; "d" }

However, this CONCAT formula returns "abcd":

CONCAT({ "a", "b" }, { "c", "d" })CONCAT({ "a"; "b" }; { "c"; "d" })

Examples

CONCAT("te", "st")CONCAT("te"; "st")

Returns "test".

CONCATENATE("te", "st")CONCATENATE("te"; "st")

Returns "test". CONCAT, CONCATENATE and the & operator are identical when not applied to arrays.

"te" & "st""te" & "st"

Returns "test". CONCAT, CONCATENATE and the & operator are identical when not applied to arrays.

CONCAT("The value is: ", TextField1)CONCAT("The value is: "; TextField1)

Returns "The value is: ", followed by the value of the text field TextField1.

CONCAT("The value is: ", NumberField1)CONCAT("The value is: "; NumberField1)

Returns "The value is: 1234.56" if the language of the app is set to Australian English and "The value is: 1234,56" if the language of the app is set to German. Thousands separators are not used.

CONCAT("The value is: ", NumberField1.FormattedValue)CONCAT("The value is: "; NumberField1,FormattedValue)

Returns a text string like "The value is: 1,234.56" for an app set to US English, and one like "The value is: 1 234,56" for an app in German. The particulars of the formatted number are determined by the formatting settings for NumberField1.

CONCAT("The value is: ", FORMATNUMBER(NumberField1, 2))CONCAT("The value is: "; FORMATNUMBER(NumberField1; 2))

Returns a text string like "The value is: 1,234.56" for an app set to US English, and one like "The value is: 1 234,56" for an app in German. The particulars of the formatted number are determined by the parameters given to the FORMATNUMBER function. Here, the second parameter 2 signifies that the number should be formatted with at least two decimal places.

CONCAT({ "a", "b" }, { "c", "d" })CONCAT({ "a"; "b" }; { "c"; "d" })

Returns "abcd". CONCAT always returns a single text string.

{ "a", "b" } & { "c", "d" }{ "a"; "b" } & { "c"; "d" }

Returns the array { "ac", "bd" }{ "ac"; "bd" }. When applied to one or two arrays, & is invoked once for every array element and the results are collected as an array.

CONCATENATE({ "a", "b" }, { "c", "d" })CONCATENATE({ "a"; "b" }; { "c"; "d" })

Returns the array { "ac", "bd" }{ "ac"; "bd" }. When applied to one or two arrays, CONCATENATE is invoked once for every array element and the results are collected as an array.

TEXTJOIN(", ", FALSE, "a", "b", "c")TEXTJOIN(", "; FALSE; "a"; "b"; "c")

Returns "a, b, c".

TEXTJOIN(", ", TRUE, TextField1:TextField10)TEXTJOIN(", "; TRUE; TextField1:TextField10)

Returns the values of TextField1:TextField10TextField1:TextField10 range, joined together with ", ". The second parameter, TRUE, instructs TEXTJOIN to ignore blank values.

TEXTJOIN(", ", TRUE, NumberField1:NumberField10)TEXTJOIN(", "; TRUE; NumberField1:NumberField10)

Returns the values of the NumberField1:NumberField10NumberField1:NumberField10 range, joined together with ", ". The second parameter, TRUE, instructs TEXTJOIN to ignore blank values. Numbers are converted to strings as though TOTEXT was used.

TEXTJOIN(", ", TRUE, (NumberField1:NumberField10).FormattedValue)TEXTJOIN(", "; TRUE; (NumberField1:NumberField10),FormattedValue)

Returns the formatted values of the NumberField1:NumberField10NumberField1:NumberField10 range, joined together with ", ". Formatted values take the formatting preferences of the owning field into account. The second parameter, TRUE, instructs TEXTJOIN to ignore blank values.