Discussion Board for collaboration related to QlikView App Development.
I've many variables in my application and I want to clear them with a loop in the script. Can you help me?
In the script you can set the variables to null by doing vVar = Null();
I usually set the variables, which I am not going to use in the front end of the application, at very end tab of my script.
If you clear the variable in the end of the script using
Let vVariable = Null() ;
Set vVariable = ;
and delete the variable in Settings > Variable Overview, the variable will be automatically deleted at the end of the script every time.
Maybe this proves to be an interesting technique for you:
This only works for variables that were not defined in the Variable Overview. Those cannot be "uncreated" in the script.
With respect to your original question, I don't know about any other LOOP-solution as QV cannot know beforehand which variables you want to drop and which ones you want to keep.
If you want a very flexible configuration in your QV documents, you could store the variable definitions in an external file (e.g. Excel)
You'll have to be careful when loading these definitions because $-sign substitution wil try to play tricks with you all the time...