2 Replies Latest reply: Mar 24, 2015 4:48 PM by Kevin Case RSS

    Variables in Qlik Sense not being deleted.

    Kevin Case

      Variables in Sense are not being deleted from the application after being deleted from the load script and all sheets.

       

      For Example, in the load script I created a variable using

       

      SET vMyDate = Date('03/24/2015');

       

      After performing a data load, the variable was added to a sheet using a text box with the expression $(vMyDate).  This works as designed.  However, after removing all references to vMyDate and performing a subsequent data load, the variable was still available.  All references to the variable were removed from all sheets and from the load script. A data reload was performed.  After the reload, a new text box was added to a sheet and the measure was added using the same expression $(vMyDate).  Since vMyDate was deleted, the test box should not have shown a value.  However, it displayed the value 3/24/2015.  How?  This variable should no longer exist!

       

      This causes issues as it seems as though the variable exists but is based on its very first definition.  How do you know what that definition originally was if there is no way to see the variable?  What happens if the same variable is created with a different expression?

       

      This issue can be reproduced in both Desktop and Server editions.

       

      I have attached a sample application that shows that the variable is still available even after no longer being referenced.

       

      Has anyone else encountered this issue?  This makes debugging set analysis very difficult.  Not sure if this is a bug.

        • Re: Variables in Qlik Sense not being deleted.
          Pablo Labbe

          Hi Kevin,

           

            I think variables cannot be removed in Sense, but you can clear the content with the command:

           

            let vMyDate = null();


            Maybe this could be done via API, but today there is no "Variable Overview Screen" to manage variables like in Qlikview.


          Best Regards,


          Pablo Labbe

            • Re: Variables in Qlik Sense not being deleted.
              Kevin Case

              Pablo,

               

              I agree with you that I could use a LET statement to set it to null but from an application/product standpoint the variable should be deleted from the application if it is no longer being referenced.

               

              Without the 'Variable Overview Screen', you as a developer have no way of knowing what variables may or may not have been created.  This caused an issue for me trying to debug some complicated set analysis over a large population of data.  I also had an issue where I had a variable originally tied to a filter object and upon adding a variable with the same name I was surprised to see it automatically tied back to that object.  Since I knew that I had originally added a variable by that name, I quickly figured out what was happening.  If it was another developer that was making changes to the application, how would they have ever known that this variable once existed?

               

              I'm not trying to be negative but I do think that this is an issue.  A 'Variable Overview Screen' needs to be added or the variable needs to be deleted when no longer referenced (or deleted from the script).

               

              Thanks for your input.  Just wanted to verify that I wasn't the only one this happened to.