Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to use same variables from one application to another application??
make use of include files
for instance you can define variables for Colors etc. and use it in every app
no Need to define them over and over
Hi Karaka,
See this article for some ideas.
http://www.qlikfix.com/2013/09/06/importing-and-exporting-variables/
Hi,
You can define the variables in a separate file and then Include (or even better Must_Include) the file in the several applications where you need to use the same variables.
$(Include =filename )
$(Must_Include =filename )
**The difference between include and must_include is that "Include" will fail silently if the file is not found during script reload, while "Must_Include" will throw an error if the file is not found.
Try Using QDF (QlikView Deployment Framework).
hi store variables in an excel sheet with three columns
Name, Expression and Comment
Name should contain name of variable example vCY_ACT_IS and Expression should be the variable expression but without = sign. example rgb(9,23,56) or sum(Sales).
now load excel file with script below…..
Temp_Variables:
LOAD Name,
Expression,
Comment
FROM
[..\0.Includes\Variables.xlsx]
(ooxml, embedded labels, table is Variables);
// Creating variables
for i = 0 to NoOfRows('Temp_Variables') - 1
let vName = peek('Name', i, 'Temp_Variables'); // Name of the variable
let vComment = peek('Comment', i, 'Temp_Variables'); // Comment/description of the variable
let $(vName) = peek('Expression', i, 'Temp_Variables') & chr(10) & '/* $(vComment) */'; // Expression
next i
//////// Removing temp variables
let i = null();
let vName = null();
let vComment = null();
//////// Removing temp tables
drop table Temp_Variables;
Cant remember where I had gotten this script but Ive found it very useful! hope it helps