1 Reply Latest reply: Sep 18, 2016 10:17 AM by Alexander Karlsson RSS

    QlikSense Mashup API - Issue in setting the parameter



      We are in the process of integration QlikSense with ASP.NET using Mashu API. We use the Named license to generate token for the web ticketing.


      The database contains details of multiple clients and based on user login we have a logic to pass the Client ID to the API so that Qlik objects (charts, tables) can be loaded with client specific data.


      We noticed incorrect data (data of all clients loaded) getting loaded in the Qlik objects during some scenarios, but this is not consistent. we can replicate this issue 3 -4 times out of 20 times which is quite annoying. Looks like the "CLIENT" id that gets passed to the API is not working for these error scenarios.


      ---------Code snippet---------

      require(["js/qlik", 'jquery'], function (qlik, $) {
      var app = qlik.openApp('8fbbb7d1-5cf7-4c8b-af57-03798e873555', config);
                      app.field("CLIENT").selectMatch(ClientName, false);
        function attach(elem) {
                          var appid = elem.dataset.qlikAppid;
                          var objid = elem.dataset.qlikObjid;
                          var app = qlikApps[appid];
                          if (!app) {
                              app = qlik.openApp(appid, config);
                              qlikApps[appid] = app;
                          app.getObject(elem, objid);
                          app.variable.setContent('vtop', '=(1+1)');
                          app.variable.setStringValue('vtop', 'if(((GetSelectedCount(Category)))=0,30,100)');
                      var elems = document.getElementsByClassName('qlik-embed');
                      var ix = 0;
                      for (; ix < elems.length; ++ix) {