Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
In mashup, I want to retrieve pivot table data using qlik sense api. In qlik sense app, pivot table has one dimension and two measures with complex expressions. I have tried using qHyperCubeDef, but it is not fetching data.
Thanks,
Guru
Yes ErikWetterberg,
I have used qInitialDataFetch property and checked qPivotDataPages also. Below is sample JSON , which i am using to get pivot table data . I have logged error in console and error message i am getting as "Object not found". Please tell me whether I am missing any property in qHyperCubeDef.
var pvTable = {"qHyperCubeDef":{"qDimensions":[{"qLibraryId":null,"qDef":{"qFieldDefs":"complex expression"},"qLabel":"complex expression","qSortBy":{"qSortByState":0,"qSortByFrequency":0,"qSortByNumeric":0,"qSortByAscii":1,"qSortByLoadOrder":0,"qSortByExpression":0,"qExpression":{"qv":" "}}}],"qMeasures":[{"qLibraryId":null,"qDef":{"qDef":"complex expression"},"qLabel":"complex expression","qSortBy":{"qSortByState":0,"qSortByFrequency":0,"qSortByNumeric":0,"qSortByAscii":1,"qSortByLoadOrder":0,"qSortByExpression":0,"qExpression":{"qv":" "}}},{"qLibraryId":null,"qDef":{"qDef":"complex expression"},"qLabel":"complex expression","qSortBy":{"qSortByState":0,"qSortByFrequency":0,"qSortByNumeric":0,"qSortByAscii":1,"qSortByLoadOrder":0,"qSortByExpression":0,"qExpression":{"qv":" "}}}],"qMode":"P","qIndentMode":true,"qInitialDataFetch":[{"qHeight":2,"qWidth":10}],"qSuppressZero":false,"qSuppressMissing":false,"qNoOfLeftDims":1,"qInterColumnSortOrder":[-1,0],"qStateName":"$"}};
qlik.createGenericObject(pvTable, function(reply){
console.log(reply);
});
Thanks,
Guru
I avoid using null in my json, try with '' instead.