2 Replies Latest reply: May 12, 2017 5:14 AM by Erik Wetterberg RSS

    Global Variable issue in QlikSense 3.2 SR3

    Maddox Raye

      I've created extension that uses global variables,and also change their value thru javascript code. I've created and test it inside QS 3.1 SR6,everything worked fine,global variables changed values,get values etc.Then I've upgraded it to 3.2 SR3 and i started getting error in console "Cannot read property 'getVariableByName' of undefined. I've went thru documentation and forums,but could not find anything that could fix my issue.Thank you in advance for your help.

      Error 1.png

      Call 1.png

      Variable 1.png

        • Re: Global Variable issue in QlikSense 3.2 SR3
          Maddox Raye

          I'm sorry for being quick to ask the question,but i will answer in case someone else has the similar issue.
          When i was creating the variable var app = qlik.currApp(); I included example from official documentation that has word "this" inside var app = qlik.currApp(this); , and that was the thing that caused my issue,I've just removed "this" from the variable and now it works like it worked in 3.1 SR6, and don't know if something was changed in the last release but after update it didn't work like before.

            • Re: Global Variable issue in QlikSense 3.2 SR3
              Erik Wetterberg

              Hi,

              This is an issue that has caused some problems... It's actually a bug that was introduced with QS 3.2 SR3 and as far as I understand is NOT fixed in QS 3.2 SR4.

               

              The currApp() call should give you the current app (or rather a wrapper around it, with all the API methods). If you include the argument, it gets the app that your extension is connected to. If you do not give an argument, it will return any app currently used, probably the first opened. With QS 3.2 SR3 the option with the argument broke: it does not work att all, returns something that cannot be used. The call without the parameter still works.

               

              If your extension is only used within the built-in client this is not a problem: the client only allows you to work with one app at a time, so there will be no problem. But if you have made a mashup that opens more than one app it will not work any more.

               

              Hope this helps

               

              Erik Wetterberg