Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

Dropping variables

Hi Community,

How to drop variables.

I have 50 variables and I have loaded from excel by for loop and I wanted to drop all together.

Note: I have all the variable names in excel.

12 Replies
tresesco
MVP
MVP

Thanks Jonathan, for the correction. You are right, I tested. So I have to correct:

You can manually delete them from Settings->Variable Overview. However, script variables would get populated again after a reload.

It would actually get deleted if the variables are assigned(before the script ends) with null or nothing (soft null) like you said, like:

Let vVarName=;

Or

Let vVarNam=null();

oknotsen
Master III
Master III

If you have no problem doing it in the front-end, you might as well just go to the variable overview and click on delete a few times.

May you live in interesting times!
Peter_Cammaert
Partner - Champion III
Partner - Champion III

This should work (based on your code):

let vi=noofrows('Tablenam');

for i=0 to (vi-1)

  let vVar=peek('vVarname',i,'Expression');

  let $(vVar)=;

next

let vi=;   // Don't forget these

let vVar=;

Peter