Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello to everybody,
I want to know if it is possible to pass external parameter inside
LOAD SCRIPT
I have this kind of script that load file from internet
LOAD var1,
var2,
.....
FROM [http://95....param1...param2...]
Is it possible to pass param1,param2..from a batch for example
call "C:\Program Files\QlikView\Qv.exe" /vvPrintReports=1 /NoSecurity "C:\test.qvw"
Regards
Oronzo
Hi Oronzo,
You can use them as variables, and pass them in the command line as you are suggesting in your batch line
"C:\Program Files\QlikView\qv.exe" /vvParameter1=100 /vvParameter2=200 /vvPrintReports=1 /NoSecurity "C:\test.qvw"
Then use the variables in your script
LOAD *
FROM [http://url?param1=$(vParameter1)¶m2=$(vParameter2)];
These variables must exist in your document, although they may be empty (menu Settings, Variable Overview).
Another option is to create these variables in an external writable text script and load them using include:
$(include=ExternalVariables.txt);
Where the ExternalVariables.txt file looks like
SET vParameter1 = 100;
SET vParameter2 = 200;
Hope that helps.
BI Consultant
Hi Oronzo,
You can use them as variables, and pass them in the command line as you are suggesting in your batch line
"C:\Program Files\QlikView\qv.exe" /vvParameter1=100 /vvParameter2=200 /vvPrintReports=1 /NoSecurity "C:\test.qvw"
Then use the variables in your script
LOAD *
FROM [http://url?param1=$(vParameter1)¶m2=$(vParameter2)];
These variables must exist in your document, although they may be empty (menu Settings, Variable Overview).
Another option is to create these variables in an external writable text script and load them using include:
$(include=ExternalVariables.txt);
Where the ExternalVariables.txt file looks like
SET vParameter1 = 100;
SET vParameter2 = 200;
Hope that helps.
BI Consultant
Thank you,
You are very quick as usual.
Regards
Oronzo
Hi Oronzo,
Glad to help. Check the second option, that I have just edited.
Regards.
BI Consultant
Miguel – Thanks for the solution. I have few questions on this... hope you can answer.
Many thanks in advance.
I wanted to learn something new today
Cheers - DV
Hi D V,
I'm assuming we are not have QlikView Server available, otherwise I had created the reload task in it, or that was my idea, since it's always better to let QlikView manage the reloads. The qv.exe is the Desktop executable file as you already know, and you can trigger this with the Windows Scheduler with a line similar to what I posted. So if you have Server and you want to do this way, you will need to install Desktop in your Server as well. As you know, you need an EDX trigger (with Publisher license) to reload not using the Management Console.
I do see a lot of sense using includes with variables, for example, when the document is being developed by more than one person, or when I have some permissions in the folder but I want people change some values.
Hope that helps.
BI Consultant