1 Reply Latest reply: Nov 29, 2017 8:12 AM by Erik Wetterberg RSS

    getContent method and callback function

    Joel Alander

      Hi,

       

      I've been working on an extension that loads some values from variables and uses those values to decide which functions to run etc. To get those values from variables I used getContent method ( getContent method ‒ Qlik Sense Developers ). It worked fine on Qlik Sense desktop version but I ran into problems when I tried the extension on Qlik sense enterprise. The problem is that the callback function doesn't get the value from getContent method before the value is used. The functions are structured like this:

       

      app.variable.getContent(variablename1, function(reply1){

           app.variable.getContent(variablename2, function(reply2){

                FunctionX(reply1, reply2);

           });

      });

       

      I also tried to use promises to solve this but these attempts were unsuccessful though. Can someone help me with this issue?