Prepends the given Table with a column containing sequence numbers. This is a convenient wrapper around using TableAppendColumns and TableSequence.
TableWithSequence([Table],[Column Index],[Column Header])
Where:
Table is the table to add a sequence column.
Column Index is the position of the new column containing the sequence of numbers.
Column Header is the heading to display above the new column containing the sequence of numbers.
Rule | Meaning |
---|---|
TableWithSequence(DWGroupTableCustomers,1,"ID") | Will return an array of the table Customers with a column added at the start, that has a header named ID, which contains sequential numbers. |
Customers Table
CustomerName | City | Country |
---|---|---|
Amazon Warriors | Paris | France |
Bolton Burners | Concord | United States |
Boston Bulls | Hanover | Germany |
Cambridge Cats | Toulouse | France |
Dynamo Dynamics | Indianapolis | United States |
Eagle Sizzlers | Columbus | United States |
Everso Lucky | Burlington | United States |
Forty Somethings | Chicago | United States |
Customers Table
ID | 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 | Indianapolis | United States |
6 | Eagle Sizzlers | Columbus | United States |
7 | Everso Lucky | Burlington | United States |
8 | Forty Somethings | Chicago | United States |
DriveWorks will return the table above as an array, which will look like:
Table returned as an Array |
---|
{"ID","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","Indianapolis","United States";6,"Eagle Sizzlers","Columbus","United States";7,"Everso Lucky","Burlington","United States";8,"Forty Somethings","Chicago","United States"} |