Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
See why Qlik is recognized as a Leader for the 10th year in a row – and discover how Qlik can help put your business in the lead. Get Report
Highlighted
savandriy
New 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?

1 Solution

Accepted Solutions
ErikWetterberg
Honored Contributor

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

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/

View solution in original post

5 Replies
ErikWetterberg
Honored Contributor

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

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/

View solution in original post

Highlighted
savandriy
New Contributor III

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

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.

Highlighted
Employee
Employee

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

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...

Highlighted
savandriy
New Contributor III

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

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 @yko !

Highlighted
goldbergjeffrey
New Contributor

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

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