Home Search

DriveWorks Pro 21
TableReplaceHeaders

Send Feedback

TableReplaceHeaders

Replaces the headers in the given Table, the result is returned as an Array.

Syntax

TableReplaceHeaders([Table], [Replacement Headers List], [Replace Blank Headers])

Where:

Table is the Table in which to replace the headers.

Replacement Headers List is a pipebar delimited list (|) of headers to replace the existing headers in the Table with.

Replace Blank Headers is set to TRUE to replace the existing header with the blank value. FALSE to leave the existing header if a blank value is supplied in the list. By default this is FALSE.

Example

RuleMeaning
TableReplaceHeaders(DwLookupCustomers,"Name|Area|",FALSE)Will replace the header row of the Customers table with the values Name and Area. The last column header will not be replaced.

Example Data

Customers Table

CustomerNameCityCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance

Example Result

Customers Table

NameAreaCountry
Amazon WarriorsParisFrance
Bolton BurnersConcordUnited States
Boston BullsHanoverGermany
Cambridge CatsToulouseFrance

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

Table returned as an Array
{"Name","Area","Country";"Amazon Warriors","Paris","France";"Bolton Burners","Concord","United States";"Boston Bulls","Hanover","Germany";"Cambridge Cats","Toulouse","France"}