Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am a new user on Qlik Sense Desktop version. To familiarize with the mashup, i create a mashup using
HelpDesk Management App as base. I create a List and added the list into the mashup.
I have confirmed the app.createList function is there and i have edited the empty callback function to :
//callbacks -- inserted here --
function cbYear(reply, app){
$("#divYear").empty();
var qobject = reply.qListObject;
console.log(qobject); // <<===== I log this in console.
$.each(qobject.qDataPages[0].qMatrix, function() {
var item = this[0];
var selT= "";
console.log(item.qState);
if (item.qState=="S") {
selT=" style=\"backgroundcolor:black\"";
}
$("#divYear").append("<button type=checkbox " + selT + " class=\"btn btn-primary pull-right\">" + item.qText + "</button>")
}) ;
$("#divYear button").click( function() {
app.field('Year').selectMatch($(this).text(),false);
});
}
Strange thing is that the reply parameter returns no values of dimension "Year".
And there is error in the browser console :
TypeError: Cannot read property 'qMatrix' of undefined <====== ERROR
at cbYear (HelpDeskMashup.js:111)
at a (qlik.js:84)
at qlik.js:84
at g (require.js:45)
at require.js:45
I search through google , but don't find anything useful on this.
Anyone can help here ?
It's too late to answer it but instead of jquery functions you should use qlik inbuilt functions (i used it in extesion),
app.getObject(objectId).then(function(e){
// this block contains layout.qHyperCube
e.getHyperCubeData('/qHyperCubeDef', [{
qTop: 0,
qLeft: 0,
qWidth: 10,
qHeight: 1000
}]).then(function(e){
//this block contains Array of qDataPages.
// perform process on data by accessing e[0].qMatrix[row][col]...
}
})
Regards,
bhargav patel
Any updates here?