<colord>

<colord> tells the system which columns to display and in what order.

Syntax

<colord cols="[COL_NAME_1,COL_NAME_2,...COL_NAME_N]" hide="[HIDE_COL_1,HIDE_COL_2,...HIDE_COL_N]"/>

Attributes

cols
A comma-separated list of column names (real or computed) to be displayed.

This is the set of all columns that may be displayed via scrolling and may include more columns than can be displayed at any one time.

If omitted, all columns are selected (except those specified in the hide attribute, if present).

You can use the * character as a wild card when you specify column names. For instance, <colord cols="c*"/> displays only those columns that begin with the letter c.

hide
A comma-separated list of column names (real or computed) to be hidden.

If omitted, all columns specified in the cols attribute (if present) are displayed; if cols is absent, all available columns are displayed.

You can use the * character as a wild card when you specify column names. For instance, <colord hide="c*"/> hides those columns that begin with the letter c.

hard
Accepts an integer value of 0 or 1 that specifies whether or not the worksheet’s hidden columns can be referenced or unhidden in any subsequent Macro Language code in the query.

When hard="1", hidden columns cannot be referenced or unhidden in subsequent Macro Language code in the query.

The default is 0.

Note: If a column is present in both the cols and hide lists, it will not be displayed (i.e., hide takes priority over cols). If a column specified in either attribute does not exist, it is ignored.

Example

<base table="pub.demo.retail.item"/>
<colord cols="date, transid, sku, store, sales, cost"/>

Example: Using the hard attribute

The following example shows that after specifying hard="1" in the <colord> operation, the sku column cannot be made visible by a subsequent <colord>.

<base table="pub.demo.retail.item"/>
<colord cols="date,store,sku"/>
<colord cols="date,store" hard="1"/>
<colord cols="date,store,sku"/>

Contrast this with the same code without the hard="1" attribute:

<base table="pub.demo.retail.item"/>
<colord cols="date,store,sku"/>
<colord cols="date,store"/>
<colord cols="date,store,sku"/>