Skip to main content

Table.CombineColumnsToRecord

Combines the specified columns into a new record-valued column where each record has field names and values corresponding to the column names and values of the columns that were combined.

Syntax

Table.CombineColumnsToRecord(
table as table,
newColumnName as text,
sourceColumns as list,
optional options as record
) as table

Remarks

Combines the specified columns of table into a new record-valued column named newColumnName where each record has field names and values corresponding to the column names and values of the columns that were combined. If a record is specified for options, the following options may be provided:

  • DisplayNameColumn: When specified as text, indicates that the given column name should be treated as the display name of the record. This need not be one of the columns in the record itself.
  • TypeName: When specified as text, supplies a logical type name for the resulting record which can be used during data load to drive behavior by the loading environment.

Category

Table.Transformation