Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
prabhuappu
Creator II
Creator II

Passing parameter from QMC

Hi,

I have a scenario in that i need to pass value for two variables from QMC.

for Example

I have created two variables in QVW file : vVariable1 and vVariable2

Is there any way to achieve this?

Thanks for the help in advance...

Regards

PRABHU APPU

1 Solution

Accepted Solutions
gainkarthi
Partner - Specialist
Partner - Specialist

Adding to the below note,

May be you can pass in a single variable and do string opertions to devide them.

View solution in original post

3 Replies
gainkarthi
Partner - Specialist
Partner - Specialist

Only one variable can receive values from QMC. You can not handle two in the same job.

gainkarthi
Partner - Specialist
Partner - Specialist

Adding to the below note,

May be you can pass in a single variable and do string opertions to devide them.

hectorgarcia
Partner - Creator III
Partner - Creator III

i Tested and worked...lets say that you need to pass 3  variable parameters.
vVariable1, vVariable2 and vVariable3.

Step 1 in the QMC put thus in parametername=vVariable1|vVariable2|vVariable3

step 2 In the paramter value type 1|2|3
step 3 in the qvw you want to pass the parameter make sure to create the variable named exactly as the parameter name you placed in step 1 (do it in the UI .. not in the script) leave it empty.

and finally in the scrit copya paste :

let vNames=vVariable1|vVariable2|vVariable3;
let vValues='$(vVariable1|vVariable2|vVariable3)';

LET vVariable1 = Subfield('$(vValues)', '|', 1);
LET vVariable2 = Subfield('$(vValues)', '|', 2);
LET vVariable3 = Subfield('$(vValues)', '|', 3);

Now you can reload your task with the parameter values you want.. (always using | as separator)
enjoy