Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Looking for sample code that "sets" path variables vs. hard-coding path vars...then when testing... have to manually reset. Would rather set PATH vars in the "MAIN" sheet once 🙂 . Please advise.
---- Stephanie Lind
Hey Stephanie,
were you trying to assign paths to variables and use them in the script?
I'm not sure what you are looking for. if that is the case, you can create variables as-
LET PathName = 'C:\abc\def\';
Using it in script will be:
LOAD * from $(PathName)filename.qvd (qvd);
Not sure, if you were looking for this!!!
Hi Rocky,
yep, that's exactly what I'm trying to do...
Which way is better: SET or LET... ?
Also, I have brackets in my code... and it seems to be running fine...do I need them?
Here is my code:
SET TestDir = "E:\Program Files\QlikView\Pinnacle Insight\PI Config Files\Test Apps\";
Store MCATestingData into [$(TestDir)MCATestingData.qvd] (qvd);
Thx in advance for your help 🙂
Hey Stephanie, if you are talking about the brackets '[' in
Store MCATestingData into [$(TestDir)MCATestingData.qvd] (qvd);
They are only necessary if you spaces or special characters in the file name or path used.
Lets say -
Store MCATestingData into [$(TestDir)MCA Testing Data.qvd] (qvd);
will give an error if you remove the '[' and ']'
that's right, I forgot. Thanks so much again... 🙂