createTable method
app.app.createTable(optional)
The Table API allow developers to work with tabular data returned from the Qlik engine without having deeper knowledge of internal constructs, like for example a hypercube. From a technical perspective it is a wrapper around HyperCube data from engine. Notification is sent when data is available. Notification will be triggered after each update. To receive notification bind a listener on OnData
of QTable
instance.
- Since:
-
- 2.1
Parameters
Name | Type | Description |
---|---|---|
rows | Array.<QRow> |
Data rows. |
headers | Array.<QHeader> | Header information. |
totals | Array.<QMeasureCell> | Total information for measures. |
rowCount | Number | Total number of rows for the qHyperCube, including rows not fetched from server. |
colCount | Number | Total number of columns for the qHyperCube. Notification OnData will be triggered after each update. |
Returns
Tip noteFor more information regarding a promise, see http://docs.angularjs.org/api/ng.$q.
Example
// Initialization using the hypercube of the current visualization
var table = qlik.table( this );
var listener = function() {
var rowCount = table.rowCount;
var colCount = table.colCount;
table.OnData.unbind( listener ); //unregister the listener when no longer notification is needed.
};
table.OnData.bind( listener ); //bind the listene
Example based on using AngularJS.
Your main script:
if ( !this.$scope.table ) {
this.$scope.table = qlik.table( this );
}
In your AngularJS template:
<tr ng-repeat="row in table.rows">
<td ng-repeat="cell in row.cells"> {{cell.qText}} </td>
</tr>
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!