Home Search

DriveWorks Pro 21
SppReOrderTableColumns

Send Feedback

SppReOrderTableColumns

Returns a Table showing specific columns.

Syntax

SppReOrderTableColumns([Table Array],[Column Order])

Where:

Table Array is a Table Array (such as the data in a standard table, or the result of a QueryDataValues Function).

Column Order is the new Column Order as a pipebar (|) delimited string, for example "2|7|5". Number starting at 1 for the first column.

Example

RuleResultMeaning
SppReOrderTableColumns(DwLookupCustomers,"1|2|4|3"){"First Name","Second Name","Country","City"; "Frank","Johnson","USA","Charlotte";"Jack","Jones","United Kingdom","Swansea";"Laura","Hughes","United Kingdom","Leeds";"Trent","Davids","Canada","Toronto"}This will return the given Array but with the columns reordered according to the specified column order given.

Example Data

FirstNameSecondNameCityCountry
FrankJohnsonCharlotteUSA
JackJonesSwanseaUnited Kingdom
LauraHughesLeedsUnited Kingdom
TentDavidsTorontoCanada