Concatenates individual strings of text and strings in tables.

Description

The Concat function concatenates the result of a formula applied across all the records of a table, resulting in a single string. Use this function to summarize the strings of a table, just as the Sum function does for numbers.

Fields of the record currently being processed are available within the formula. You simply reference them by name as you would any other value. You can also reference control properties and other values from throughout your app. For more details, see the examples below and working with record scope.

The Concatenate function concatenates a mix of individual strings and a single-column table of strings. Used with individual strings, this function is equivalent to using the & operator. You can use a formula that includes the ShowColumns function to create a single-column table from a table that has multiple columns.

Syntax

Concat( Table, Formula )

  • Table - Required. Table to operate on.
  • Formula - Required. Formula to apply across the records of the table.

Concatenate( String1 [, String2, ...] )

  • String(s) - Required. Mix of individual strings or a single-column table of strings.

Examples

Concat

  1. Add a button, and set its OnSelect property to this formula:

    Collect(Products, {String:"Violin", Wind:"Trombone", Percussion:"Bongos"}, {String:"Cello", Wind:"Trumpet", Percussion:"Tambourine"})

  2. Press F5, click the button, and then press Esc to return to the design workspace.

  3. Add a label, and set its Text property to this formula:

    Concat(Products, String & " ")

    The label shows Violin Cello.

Concatenate

  1. Add an input-text control, and name it AuthorName.

  2. Add a label, and set its Text property to this formula:
    Concatenate("By ", AuthorName.Text)

  3. Type your name in AuthorName.

    The label shows By followed by your name.

If you had an Employees table that contained a FirstName column and a LastName column, this formula would concatenate the data in each row of those columns.
Concatenate(Employees.FirstName, " ", Employees.LastName)