Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hi Laurent,
It feels weird, but have you tried "qType": "dimension" intead of "qType": "Dimension" , that works for me, for some reason.
Regards,
aiham
Hi Laurent,
It feels weird, but have you tried "qType": "dimension" intead of "qType": "Dimension" , that works for me, for some reason.
Regards,
aiham
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.
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 !"}
}
}
}