concat

concat(T.A : text) sort T.B : ‘a 🡒 text, aggregaor

The aggregator requires a sort option to be specified and returns the resulting concatenation of the text values.

Example:

table T = with
  [| as A, as B |]
  [| "hello ", "a" |]
  [| "hello ", "a" |]
  [| "hello ", "b" |]
  [| "world",  "b" |]
  [| "world",  "c" |]

table G[gdim] = by T.B

where T.B != "c"
  show table "" a1b4 with
    gdim
    concat(T.A) sort T.A
    group by gdim

The sort option can be applied to any ordered data type.

Beware, text values are limited to 256 characters in Envision.

It would also be possible to re-implement concat with a user-defined process:

def process myConcat(a : text) with
  keep c = ""
  where c == ""
    c = a
  else
    c = "\{c}\{a}"
  return c

See also

concat(variadic t: ‘a) 🡒 text, variadic pure function

Returns the concatenation of all the values - of any data types - passed as argument. The function is variadic, it accepts a varying number of argumnents greater or equal to two.

Example:

show summary "" a1d3 with
  concat("0", 1, "2", 3) // returns "0123"
  concat("Hello", " ") // returns "Hello "
  concat("Hello", " ", "World") // returns "Hello World"
  concat("Hello", " ", "World", "!") // returns "Hello World!"

All the input values, if not text values already, are converted to text using the text function.

This function is similar to the CONCAT Excel function.

See also