bindingInfo.colFields

query to specify the data block from which the Crosstab displays data.

Specifies the data block fields to be used as crosstab column headers. This is equivalent to adding fields into the ‘Columns’ region of the Crosstab Editor.

crosstab editor Columns region with column header fields assigned

Type

Array

Example

Cross Crosstab1.query = 'Sales';
Crosstab1.bindingInfo.rowFields = ['Category','Name'];
Crosstab1.bindingInfo.colFields = ['Region','State'];
Crosstab1.bindingInfo.measureFields = ['Total','Quantity Purchased'];

crosstab with category and name as rows region and state as columns

Either syntax below can be used in component script:

bindingInfo.colFields             // unqualified
Crosstab1.bindingInfo.colFields   // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.