Skip to main content
Version: 8.1

columnRearrange

This function is used by Ignition's Expression language.

Description​

Returns a view of the given dataset with the given columns in the order specified. Columns may be omitted in order to filter out columns from the original dataset.

Syntax​

columnRearrange(dataset[, col...])

  • Parameters

    • DataSet dataset - The starting dataset.

    • string col - Optional. Any number of column names, in the order that they should appear. The columns specified must match columns in the original dataset.

  • Results

    • DataSet - A new dataset with columns in the order specified.

Examples​

Code Snippet
// Returns a 3 column Dataset from a Table component called "fiveColDataset" in the same Root Container, where the columns are in the given order.
columnRearrange({Root Container.fiveColDataset.data}, "secondCol", "thirdCol", "firstCol")