DriveWorks Pro 15: TableWithSequence [send feedback...]

TableWithSequence

Prepends the given table with a column containing sequence numbers. This is a convenient wrapper around using TableAppendColumns and TableSequence.

Syntax

TableWithSequence([Table] As Table)

Where:

Table is the table to add a sequence column.

Examples

RuleMeaning
TableWithSequence(DWGroupTableCustomers)Will return an array of the table Customers with a column added , that has a blank header, which contains sequential numbers.

Example Data

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance
Dynamo DynamicsIndianaUnited States
Eagle SizzlersMaineUnited States
Everso LuckyVermontUnited States
Forty SomethingsIllinoisUnited States

Example Outcome

Customers Table

CustomerNameCityCountry
1Amazon WarriorsParisFrance
2Bolton BurnersConcordUnited States
3Boston BullsHanoverGermany
4Cambridge CatsToulouseFrance
5Dynamo DynamicsIndianaUnited States
6Eagle SizzlersMaineUnited States
7Everso LuckyVermontUnited States
8Forty SomethingsIllinoisUnited States

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"","CustomerName","City","Country";1,"Amazon Warriors","Paris","France";2,"Bolton Burners","Concord","United States";3,"Boston Bulls","Hanover","Germany";4,"Cambridge Cats","Toulouse","France";5,"Dynamo Dynamics","Indiana","United States";6,"Eagle Sizzlers","Maine","United States";7,"Everso Lucky","Vermont","United States";8,"Forty Somethings","Illinois","United States"}


Table of Contents