Thursday, August 22, 2013

Load variable from text file

QV - Community Posts:
http://community.qlikview.com/thread/89947

Method 1:
 Load the Text file into QlikView & use Peek function to populate the Variable.

Variable_Table:
LOAD @1
FROM
Variable_Txt.txt
(txt, codepage is 1252, explicit labels, delimiter is '\t', msq);

LET X=NUM(Peek('@1',0,'Variable_Table'));

Method 2:
Use Include Statement , to get the variable - if the text in file can be made as LET STATEMENT.

write "LET vPQLow = 54;"

And then INCLUDE this into the QV Script:

$(Include=C:\Path\vPQLow.txt);