Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
slaheddinekeyru
Partner - Contributor III
Partner - Contributor III

Using parameters with Must_Include

Hello community

I want to use parameters in must_include so I can use the value of this parameter in the script called by the must_include variable.

I want to use something like that :

$(Must_Include=$($(p_Path_Package)/Scripts/Create_Variables.qvs),'TRANSVERSE');

Where 'TRANSVERSE' is the parameter I want to use. In my Create_Varaibles.qvs script I'm calling this parameter using $1 but it doesn't function.

Any idea please ?

I don't wanna use additional variables.

Thank you very much for your help !

1 Solution

Accepted Solutions
marcus_sommer

I believe it won't be possible in this way because an include-variable will just pull the external content within the script as if it's be written there. But I think you could get your wanted result with a slight change in your approach.

For this open your Create_Variables.qvs and add at the very first/last row a sub-statement like:

sub CreateVariables(myParameter)

     ... YourCode ... by using '$(myParameter)' instead of $1

end sub

Then you calls this include-variable quite early within your script maybe after the main variable-declarations and if you want to execute this script-part later in your script you used:

call CreateVariables('TRANSVERSE')

- Marcus

View solution in original post

3 Replies
YoussefBelloum
Champion
Champion

Hi stalwar1

Can you please take a look ?

Thank you

marcus_sommer

I believe it won't be possible in this way because an include-variable will just pull the external content within the script as if it's be written there. But I think you could get your wanted result with a slight change in your approach.

For this open your Create_Variables.qvs and add at the very first/last row a sub-statement like:

sub CreateVariables(myParameter)

     ... YourCode ... by using '$(myParameter)' instead of $1

end sub

Then you calls this include-variable quite early within your script maybe after the main variable-declarations and if you want to execute this script-part later in your script you used:

call CreateVariables('TRANSVERSE')

- Marcus

slaheddinekeyru
Partner - Contributor III
Partner - Contributor III
Author

Marcus,

Thank you very much.

That solves my problem