English Qlik Sense Developers 2.2

Table API

new QTable()

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.

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 listener

Example: Your main script, based on using AngularJS.


	if ( !this.$scope.table ) {
	this.$scope.table = qlik.table( this );
	}

Example: In your AngularJS template

	<tr ng-repeat="row in table.rows">
        	<td ng-repeat="cell in row.cells"> {{cell.qText}} </td>;
        </tr>