Skip to main content

columns

Selects columns from a table.

The return value is a table region. If the region comprises a single column, Studio prints the return value as a punctuated list. If the region spans two or more columns, Studio prints an HTML table.

The output is always a table region, even if the printed output is a punctuated list.

Note

Available in "Describe the Table" and "Describe Row in Context" projects only.

Parameters

  • COLUMN NAME (column or string)

    A column you wish to select.

  • COLUMN NAME (column or string)

    Optional. Another column you wish to select.

  • COLUMN NAME (column or string)

    Optional. Another column you wish to select.

Notes

  • You can select as many columns as required.

  • The input to each parameter can be a column variable or column name (string).

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

When you select one column, Studio prints the resulting region as a punctuated list.

ATL in Script

Result

[[columns(Sales)]]

14,000, 33,000, 16,000 and 32,500

When you select two or more columns, Studio prints the resulting region as an HTML table. For example:

[[columns(Branch, Sales, Profit)]]

The return value is this table region:

ID

Branch

Sales

Profit

Row 1

1

Aberdeen

14,000

4,500

Row 2

2

Edinburgh

33,000

10,500

Row 3

3

Inverness

16,000

6,250

Row 4

4

Glasgow

32,500

13,050

Note

The row names — the ID values in this example — are always included in the region.

To get the same output in a "Describe Row in Context" project, the ATL is:

[[columns(BranchColumn, SalesColumn, ProfitColumn)]]