Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, I need help in getting the Qlik Sense table data into javascript object via capability API or any other API. Below is the table that present in data model viewer. I need to fetch this table into my javascript object. Can someone direct me in the right path?
Thanks bill.markham for your response.
I am able to create hypercube and pull the data using createcube method. But above table has the mapping (dimension name and label name) for straight table dimensions that needed for creating hypercube. How do I set the dimension label (Column label) to the defined in the above table dynamically.?
For Example :-
"CustLevel1" column should have "Company" as the column header. This mapping may vary for another app, so looking for generic solution.
app.createCube({
"qInitialDataFetch": [
{
"qHeight": 20,
"qWidth": 2
}
],
"qDimensions": [
{
"qDef": {
"qFieldDefs": [
"CustLevel1"
]
},
"qNullSuppression": true,
"qOtherTotalSpec": {
"qOtherMode": "OTHER_OFF",
"qSuppressOther": true,
"qOtherSortMode": "OTHER_SORT_DESCENDING",
"qOtherCounted": {
"qv": "5"
},
"qOtherLimitMode": "OTHER_GE_LIMIT"
}
},
{
"qDef": {
"qFieldDefs": [
"CustLevel2"
]
},
"qNullSuppression": true,
"qOtherTotalSpec": {
"qOtherMode": "OTHER_OFF",
"qSuppressOther": true,
"qOtherSortMode": "OTHER_SORT_DESCENDING",
"qOtherCounted": {
"qv": "5"
},
"qOtherLimitMode": "OTHER_GE_LIMIT"
}
}
],
"qMeasures": [],
"qSuppressZero": false,
"qSuppressMissing": false,
"qMode": "S",
"qInterColumnSortOrder": [],
"qStateName": "$"
},CubeCreatedCallback);
You need to create HyperCube of your data. Here is the relevant section of the online help, https://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/Structs/HyperCube.htm
Thanks bill.markham for your response.
I am able to create hypercube and pull the data using createcube method. But above table has the mapping (dimension name and label name) for straight table dimensions that needed for creating hypercube. How do I set the dimension label (Column label) to the defined in the above table dynamically.?
For Example :-
"CustLevel1" column should have "Company" as the column header. This mapping may vary for another app, so looking for generic solution.
app.createCube({
"qInitialDataFetch": [
{
"qHeight": 20,
"qWidth": 2
}
],
"qDimensions": [
{
"qDef": {
"qFieldDefs": [
"CustLevel1"
]
},
"qNullSuppression": true,
"qOtherTotalSpec": {
"qOtherMode": "OTHER_OFF",
"qSuppressOther": true,
"qOtherSortMode": "OTHER_SORT_DESCENDING",
"qOtherCounted": {
"qv": "5"
},
"qOtherLimitMode": "OTHER_GE_LIMIT"
}
},
{
"qDef": {
"qFieldDefs": [
"CustLevel2"
]
},
"qNullSuppression": true,
"qOtherTotalSpec": {
"qOtherMode": "OTHER_OFF",
"qSuppressOther": true,
"qOtherSortMode": "OTHER_SORT_DESCENDING",
"qOtherCounted": {
"qv": "5"
},
"qOtherLimitMode": "OTHER_GE_LIMIT"
}
}
],
"qMeasures": [],
"qSuppressZero": false,
"qSuppressMissing": false,
"qMode": "S",
"qInterColumnSortOrder": [],
"qStateName": "$"
},CubeCreatedCallback);