Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
laurentpaume
Partner - Contributor III
Partner - Contributor III

Displaying a master dimension in Qlik Sense App

Hi Qlik Devs,

I am currently working on my new extension and I am not finding the solution to create a master dimension and display it into my Sense app.

Here is the code to create the master dimension (tested in Engine Api Explorer) :

{

  "handle": 1,

  "method": "CreateDimension",

  "params": {

  "qProp": {

  "qInfo": {

  "qId": "Dimension21",

  "qType": "Dimension"

  },

  "qDim": {

  "qGrouping": 0,

  "qFieldDefs": [

  "LBL_STORE"

  ],

  "qFieldLabels": [

  "Store"

  ]

  },

  "qMetaDef": {}

  }

  }

}

It returns me the following response :

{

  "jsonrpc": "2.0",

  "id": 9,

  "result": {

  "qReturn": {

  "qType": "GenericDimension",

  "qHandle": 4,

  "qGenericType": "Dimension",

  "qGenericId": "72fa4096-c176-48dd-b71d-d8c0c9f74d0c"

  },

  "qInfo": {

  "qId": "72fa4096-c176-48dd-b71d-d8c0c9f74d0c",

  "qType": "Dimension"

  }

  },

  "change": [

  4

  ]

}

At this point when I get back to my app, I don't find the Master Dimension.

I don't know if I have to create an Hypercube to show this in my app or if I'm missing something.

Thanks for your help !

Regards,

Laurent.

Beasy.

1 Solution

Accepted Solutions
Aiham_Azmeh
Employee
Employee

Hi Laurent,

It feels weird, but have you tried  "qType": "dimension" intead of "qType": "Dimension" , that works for me, for some reason.

Regards,

aiham

View solution in original post

3 Replies
Aiham_Azmeh
Employee
Employee

Hi Laurent,

It feels weird, but have you tried  "qType": "dimension" intead of "qType": "Dimension" , that works for me, for some reason.

Regards,

aiham

laurentpaume
Partner - Contributor III
Partner - Contributor III
Author

Completely Crazy, yes Aiham, it works but in a strange manner ...

I get an empty name for the dimension ... I will try to find why this afternoon.

Thanks a lot.

laurentpaume
Partner - Contributor III
Partner - Contributor III
Author

Ok everything's fine now :

This is the correct way of creating a dimension in QlikSense using the API :

{

  "handle": 1,

  "method": "CreateDimension",

  "params": {

  "qProp": {

  "qInfo": {

  "qId": "Dimension21",

  "qType": "dimension"

  },

  "qDim": {

  "qGrouping": 0,

  "qFieldDefs": [

  "LBL_STORE"

  ],

  "qFieldLabels": [

  "Store"

  ]

  },

  "qMetaDef": { "title": "Store Title goes here !"}

  }

  }

}