columnNames
Returns a list of all column names in a table.
You can specify a table region using the first parameter. By default, the function interrogates the whole table.
The list of column names reflects the column order in the data (working left to right).
Note
Available in "Describe the Table" and "Describe Row in Context" projects only.
Parameters
REGION (table region)
Optional. The input table region.
Default: The whole table
Examples
Assume a "Describe the Table" project with this data:
ID | Branch | Manager | Sales | COGS | otherExp | Profit | |
---|---|---|---|---|---|---|---|
Row 1 | 1 | Aberdeen | Andrew Gray | 14,000 | 8,000 | 1,500 | 4,500 |
Row 2 | 2 | Edinburgh | Emma Moore | 33,000 | 19,000 | 3,500 | 10,500 |
Row 3 | 3 | Inverness | Linda Barclay | 16,000 | 8,250 | 1,500 | 6,250 |
Row 4 | 4 | Glasgow | Louise Scott | 32,500 | 17,750 | 1,700 | 13,050 |
If the optional parameter is unspecified, the function interrogates the whole table.
ATL in Script | Result |
---|---|
| Branch, Manager, Sales, COGS, otherExp and Profit |
Note
The first column — ID in the example table above — is the row names column.
The function does not return the name for the focus row column.
Any input to the optional parameter should return a table region.
ATL in Script | Result |
---|---|
| Sales and COGS |
Note
In a "Describe Row in Context" project, the column variables are SalesColumn
and COGSColumn
.