Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Dollar-Sign Expansion with Parameters - Include

I use the following to call a qvs file.

$(include=...My_QV-Script.qvs)

How do I pass to the file a couple of variables as parameters?  vVar1, vVar2 ?

How do I call parameters value in my qvs file?

Thanks in advance,

Aldo.

2 Replies
sbaldwin
Contributor III

Re: Dollar-Sign Expansion with Parameters - Include

Hi Aldo, as the Include statement is simply inserting the saved script into your script you can just reference the variable in the saved script script and declare it in your qvw script for example if the following was saved in a test.qvs file:

ASCII:

Load

if(RecNo()>=65 and RecNo()<=90,RecNo()-64) as Num,

Chr(RecNo()) as AsciiAlpha,

RecNo() as AsciiNum

autogenerate 255

Where (RecNo()>=32 and RecNo()<=$(vXXX)) or RecNo()>=160 ;

you can define the variable vXXX in your main script and it will be passed intrinsically ie :

 

set vXXX = 126;

$(Include=C:\test.qvs)

Thanks

Steve

Not applicable

Re: Dollar-Sign Expansion with Parameters - Include

Hi Steve,

That's exacly the workaround I used.

I am pretty sure there is a possibility to pass variables as parameters fo the call to qvs file.

Thanks,

Aldo.

Community Browser