Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
savandriy
Contributor III
Contributor III

Get a list of all Dimensions in app from in a Qlik Sense Extension

Greetings Qlik community!

I am working on a Qlik extension that will allow custom filtering. For that to work, I need to get a list of all dimensions in an app, so I can fetch data / do selections.

I've spent hours reading the docs and the forum, and the closest I could find is to use the Qlik Engine JSON API, and from what I could find it's not accessible through the Extension API. 

Does anyone know how to do this?

Labels (3)
1 Solution

Accepted Solutions
5 Replies
ErikWetterberg

Add the system data you need to your data model, described in initialProperties. I have written about this here:

http://extendingqlik.upper88.com/accessing-system-data-and-variables-in-a-qlik-sense-extension/

savandriy
Contributor III
Contributor III
Author

The problem is, I've tried both app.getList("DimensionList") and specifying "qDimensionListDef" in the "initialProperties". Both return an empty array.

Currently, I have the dimension names hard coded, and I am able to get the data and do selections.

Øystein_Kolsrud
Employee
Employee

When you say "a list of all dimensions in an app"... Are you sure you mean all "dimensions" and not all "fields"? "dimension" in this context typically means "library dimensions". It's those you get when you create one of those DimensionList objects. It might be that it is actually a "FieldList" you want:

https://help.qlik.com/en-US/sense-developer/November2019/Subsystems/EngineAPI/Content/Sense_EngineAP...

savandriy
Contributor III
Contributor III
Author

Yep, turned out what I needed was to get the fields, and not dimensions. Still getting used to this stuff. 

I installed Erik's syslist extension, and it showed 0 dimensions too, but 100+ fields.

Thanks for help @ErikWetterberg @Øystein_Kolsrud !

Jeffrey_Goldberg
Employee
Employee

Hi, to get the list of dimensions you want to use the backendapi inside your extension to get dimension info.

https://help.qlik.com/en-US/sense-developer/November2019/Subsystems/APIs/Content/Sense_ClientAPIs/Ba...

An alternative is to use Enigma.js as well which is a better long term solution but has a little more complexity but a lot more power.

https://github.com/qlik-oss/enigma.js/

Cheers,

Jeff G