A Qlik Sense Generic Object can also be used to list objects in the Qlik Sense app to which it belongs. You can use it to list things like:
- media (that is images controlled by Qlik Sense)
- master objects
List are live – your callbacks might be called several times
- if the user adds a bookmark, you will get a new bookmarklist
- if the user adds a measure, you will get a new measurelist
- if the user adds a dimension, you will get a new dimensionlist
Configure the data you get in your list
The data you get in your lists is configurable. If you use the API method, you will get a default set of fields for each item in the list, but you can set the list up to suite your needs.
As an example, if you use the api method getList(‘measure’, callback), you will get a list where records look like this:
The first and second part, qInfo and qMeta, will always be there. They contain the id to use when refering to this measure and title and description use ful in a list of measures. The third part however, qData, is configurable. The default configuration just gives you tags and title one more time, but if you instead want more data about the measure, you can use your own measure list definition like this:
Under qData you provide your own mapping of the properties you want. In this case I have just specified that I want everything under qMeasure included. You can also specify individual fields.
And get output that includes more data for the measures:
And the same goes for the other lists, you can supply your own definitions and get more data included.