Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I pass variable values from one QVW to another QVW?
If my Variable1 value in QVW1 is 1, then when I open QVW2 using Action, Variable1 in QVW2 has to be assigned value '2'. I applied 'Transfer State' in action but doesn't help.
I went through other related posts but most of them involve Macros etc.
Is there a simple way to achieve this?
AFAIK, variables can not be passed between QV's.
But, how I do:
Create a table with key-value pairs:
QMvars:
LOAD * INLINE [
QMkey, QMval
vFri, 4/3/2020
vSat, 4/4/2020
vSun, 4/5/2020
vTue, 3/31/2020
];
After receiving it through BINARY LOAD,
QMstr:
LOAD Concat('Let '&QMkey&'='&Chr(39)&QMval&Chr(39),';') As QMstr
Resident QMvars;
Let vQMstr = Peek('QMstr',0,'QMstr');
$(vQMstr); //Execute the string
Drop Table QMstr;
Check the Help link below, scroll to the Open QlikView Document header and check the contents there against what you are seeing, if something is not behaving according to the documentation, I would recommend submitting a support case at that point.
The way the Help reads, the transfer state option is going to xfer the existing values, so it would set the variable to 1, not 2 in the other doc if I am reading things correctly. You may want to consider using the Open URL if you are using Ajax client, as that way you could use the OpenDoc call and then you have access to the parameters to set things that way, but I am not sure you can push in a variable setting. Sorry I do not have anything better for you.
Regards,
Brett