fields

query to specify the data block from which to draw the fields.

Specifies the field of the data block to be displayed by the Text component. This is equivalent to selecting fields under the Data tab of the component ‘Properties’ dialog box.

bindingInfoTextFields

When you use a bivariate aggregation method (e.g., correlation), the fields array should contain two field names. Otherwise, the array should contain just a single field name.

Type

Array

Example

Univariate aggregation
Text1.query = 'Sales';
Text1.fields = ['Total'];
Text1.formula = StyleConstant.AVERAGE_FORMULA;
Bivariate aggregation
Text1.query = 'Sales';
Text1.fields = ['Total','Quantity Purchased'];
Text1.formula = StyleConstant.CORRELATION_FORMULA;

Either syntax below can be used in component script:

fields            // unqualified
Text1.fields      // qualified

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