getList method
qlik.app.getList(type, callback)
Gets a list of internal Qlik Sense objects and registers a callback to receive the data.
- Since:
-
- 1.0
- Updated:
-
- 1.1, 2.0, 2.1
Parameters
| Name | Type | Description |
|---|---|---|
| type | String |
Type of object:
|
| callback | Function |
Optional. Registers a callback that is executed every time data is returned. |
Returns
A promise of an object model
Examples
Example: Retrieving a FieldList
app.getList("FieldList", function(reply){
var str = "";
$.each(reply.qFieldList.qItems, function(key, value) {
str += value.qName + ' ';
});
alert(str);
});Example: Retrieving a SnapshotList
app.getList("SnapshotList", function(reply){
reply.qBookmarkList.qItems.forEach(function(snapshot){
console.log(snapshot.qInfo.qId);
});
});