Skip to main content

createList method

ON THIS PAGE

createList method

Note: STABLE.

This API is reliable and breaking changes are unlikely.

qlik.app.createList(qListObjectDef, callback)

Defines a list of field values and registers a callback to receive the data.

Version history

Introduced 1.0

Parameters

qListObjectDef

Type: Object

List definition.

Extends the qListObjectDef, see Engine API: ListObjectDef.

callback

Type: Function

Optional.

Callback method. Registers a callback that is executed every time data is returned.

Returns

A promise of an object model.

Tip: For more information regarding a promise, see https://code.angularjs.org/1.7.0/docs/api/ng/service/$q#the-promise-api.

Examples

app.createList({
"qDef": {
	"qFieldDefs": [
		"LastName"
	]
},
"qInitialDataFetch": [{
		qTop : 0,
		qLeft : 0,
		qHeight : 20,
		qWidth : 1
	}]
}, function(reply) {
	var str = "";
	$.each(reply.qListObject.qDataPages[0].qMatrix, function(key, value) {
		str += '<li>' + value[0].qText + '</li>';
	});
	$('#list').html(str);
	;
});

 

See also: