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

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
Partner - Creator III
Partner - Creator III

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
Author

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.