Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pass parameters when loading script for QVW

Hi

Is it possible that parameters can be passed into a QVW when it is being reloaded.  What I am looking to do is have the ability to load data for a given period, say 1st April 2014 to 31st July 2014.  Come say mid September, i want to load up to Aug 14.  The idea behind this is that I may want to reload data in Aug, but I dont want the period to change. 

16 Replies
Not applicable
Author

Test1.png

Hi there,

Any number of parameters can be passed into the QVW right before the reload by using the above option. You can create two variables vStart and vEnd in your script and using the above you can pass values to those variables.

Thanks

Not applicable
Author

In my reload I dont have that option.  Must be version?  Im on QV11

Not applicable
Author

Mine is QV11 as well. Can you share your screenshot?

martynlloyd
Partner - Creator III
Partner - Creator III

Hi, I use a qvs file and the INCLUDE statement.

I can even write parameters into the qvs file using another script

Example

Parms:

LOAD

'Set vMyParm = Setting1' as Param1

Autogenerate;

Store Parms into Config.qvs (txt);

regards

M.

Not applicable
Author

can you send me an example. 

I want to be able to pass params into the following where statement where the two dates are on a reload:

DIMFinancialPeriod:

SELECT date as FinancialPeriod

--date as SLRFinancialPeriod

, [Year] as 'Year'

, [quarter] as 'Quarter'

, left([month],3) as 'Month'

,left([month],3) + ' ' +[Year] as 'MonthYear'

,[Year] + ' ' + left([month],3) as 'YearMonth'

FROM Dates;

where date between '2013-04-01' and '2013-04-09';

Not applicable
Author

Hi,

If you are using Desktop version, you can also pass parameters through command line like this

"D:\CLICKVIEW\QlikView\Qv.exe" /l /v var1= %DBNAME D:\qlickview\Copy of rpt_datafile1.qvw


Please refer this link below

Command line arguments in qlickview


Regs

-Ram

Not applicable
Author

thanks but do you have an example based on what i sent

martynlloyd
Partner - Creator III
Partner - Creator III

Create a qvs file with params: you can use notepad or create a blank script and export.

Set vStartDate='2013-04-01';
Set vEnddate='2013-04-09'

Then use include to use it in your script

// Script
$(Include=community.qvs);


...
Where date between $(vStartDate) and $(vEndDate);

regards,

M

Not applicable
Author

Hi

Can you give me an example of this please.