Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to pass variable value from desktop command line .
In my qvw I have following script:
Let vyear=2019;
LOAD
'Customer'&Ceil(RAND()*100) as CustomerName,
Date(makedate('$(vyear)')+floor(RAND()*(1*365+1))) as Date,
round(RAND()*1000+50,10) as InvoiceValue,
recno() as InvoiceNo
autogenerate 100;
vyear - is the variable I want to pass its value from command line . Now in command line I am writing this command
"C:\Program Files\QlikView\qv.exe" /vvyear=2020 "c:\temp\myqv.qvw"
I want to pass the vyear variable value from command line. It seems it is not working .
Any thoughts.
Thank you.
Maye be :
//Let vyear=2019;
LOAD
'Customer'&Ceil(RAND()*100) as CustomerName,
Date(makedate('$(vyear)')+floor(RAND()*(1*365+1))) as Date,
round(RAND()*1000+50,10) as InvoiceValue,
recno() as InvoiceNo
autogenerate 100;
and
"C:\Program Files\QlikView\qv.exe" /r /vvyear=2020 "c:\temp\myqv.qvw"
and reopen the document
Maye be :
//Let vyear=2019;
LOAD
'Customer'&Ceil(RAND()*100) as CustomerName,
Date(makedate('$(vyear)')+floor(RAND()*(1*365+1))) as Date,
round(RAND()*1000+50,10) as InvoiceValue,
recno() as InvoiceNo
autogenerate 100;
and
"C:\Program Files\QlikView\qv.exe" /r /vvyear=2020 "c:\temp\myqv.qvw"
and reopen the document
Hi Taoufiq_ZARRA,
Thank you for your quick reply. It did not work.
I believe we should have the variable in the load script .
Works for me.
yes we have to declare the variable
Do you close and open the file ?
Hi ,
You are right it works .
Don't we need to define variable in the load script. Do we need to comment the variable in load script ?
yes i think for the first time but after no need