Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am wondering if there is a way to have 1 "Set Variable" action affect many other variable.
For example, regarding hierarchical variables...
I would like to assign the value of a level 1 variable to override all the values of the related level 2 variables. Perhaps they could get listed with a separator between each variable?
e.g. the following image is the essence, but it does not work:
If there is no way to do it in the Qlikview environment, please provide resources that will help me create a macro (I have lots of experience in coding in VBA).
Thank you all for the responses. To close the loop...
1) The suggestion to create multiple "Set Variable" actions is correct, but I needed a work around to be able to mass produce this activity because my real application has hundreds of user input variables.
2) The suggestion to set the variables equal to their parent in the hierarchy is a good start, but I needed my end user to be able to interact with each of these hundreds of variables on the fly.
3) I settled on the use of VBA macros to accomplish this.
I made a handful of subroutines to push & pull the user input values at different levels
Each of the above applies to the L3 user input variables (about 150 for each of normal and Federal Gov)
The Set Variable action can set the value of only one variable. You can use three Set Variable actions, one for each variable.
I agree with Gysbert, why can't you use three set variable actions for the same object giving them all the same value?
Best,
Sunny
Hi,
What I would try is
If you are creating your variable in the script then do this
SET vTest1 =1 ;
SET vTest2 = '=vTest1';
SET vTest3 = '=vTest1';
Which mean in the UI you can assign a value to vTest1 from anyway and vTest2 & vTest3 will inherit their values from vTest1.
If you're creating your variable from Variable overview simply create vTest1 assign value of your choice then create vTest2 and give it value to be =vTest1 and same for vTest3 it value should be =vTest1.
A simple test I did quickly was to have all the variables in Input Box and assign value to vTest1 and I can see vTest2 and vTest3 having same value as vTest1.
Hope this helps
Thank you all for the responses. To close the loop...
1) The suggestion to create multiple "Set Variable" actions is correct, but I needed a work around to be able to mass produce this activity because my real application has hundreds of user input variables.
2) The suggestion to set the variables equal to their parent in the hierarchy is a good start, but I needed my end user to be able to interact with each of these hundreds of variables on the fly.
3) I settled on the use of VBA macros to accomplish this.
I made a handful of subroutines to push & pull the user input values at different levels
Each of the above applies to the L3 user input variables (about 150 for each of normal and Federal Gov)