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

Name Type Description
qListObjectDef Object

List definition.

Extends the qListObjectDef, see Engine API: ListObjectDef.

callback Function

Optional.

Callback method. Parameter will contain a qListObject.

Returns

A promise of an object model.

Tip: For more information regarding a promise, see https://code.angularjs.org/1.5.8/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:

 

Did this information help you?

Can you tell us why it did not help you and how we can improve it?