Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
i have a question, i use this code:
Temp_Variables:
LOAD
Name,
"Definition"
FROM [lib://MyData/Template_Variablen.xlsx]
(ooxml, embedded labels, table is Sheet1);
for i = 0 to NoOfRows('Temp_Variables')- 1
let vName = peek('Name', i, 'Temp_Variables');
let $(vName) = peek('Definition', i, 'Temp_Variables');
next i
and this code does work great and flawless, with this script-code: i import from Excel-spreadsheet all stored variabels into my Qlik Sense App, on the base of this situation i have a question,
is there any code or techniques to delete all variabels per script-code ?
Thanks a lot for your help and feedback
Beck
Hello Beck,
the only way is to delete them in the variables overview.
If you tant that nobody can see the value of a variable you can set them to null at the end of the script (one by one).
Hi Martin,
thanks a lot for your feedback, i am aware about this option in Qlik Sense, i thought whether is there an option to delete all variables within my app automatically (via script)?
but thanks a lot for your help
Beck
Hi Lakshmipathi,
thanks a lot for your help, it does look good, but i am looking for a bit another issue.
Thanks a lot
Beck
Hi Martin and Lakshmipathi,
i created this solution, i know there is a room for improvment,but it does work and it does look like:
Temp_Variables:
LOAD
Name,
"Definition"
FROM [lib://MyData/Template_Variablen.xlsx]
(ooxml, embedded labels, table is Sheet1);
/////////////////////////////////////////////////////////Variables will be stored
for i = 0 to NoOfRows('Temp_Variables')-1
let vName = peek('Name', i, 'Temp_Variables');
//let vComment = peek('Comment', i, 'Temp_Variables');
let $(vName) = peek('Definition', i, 'Temp_Variables');
next i
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////// the content of variables will be deleted ( before i use this code, i comment out the above code, where i store my variables within my app) ///////////
Sub DeleteVariables
for i = 0 to NoOfRows('Temp_Variables')-1
let vName = peek('Name', i, 'Temp_Variables');
let $(vName) = Null();
next i
End Sub;
Call DeleteVariables;
////////////////////////////////////////////////////////////////////////////////
i hope that helps and thanks a lot for your help and feedback
Beck