Discussion Board for collaboration related to QlikView App Development.
I have a requirement in which I have two list boxes (Or Say Fields) which has no Association between them. My requirement is, when I select multiple values in one list box, the same values should be selected in the other list box also. Below is the sample code. On selection of multiple "Countries", I want same values to be selected in the "Area".
Note: I want it using triggers only. I don't want to have any association between them.
LOAD * INLINE [
LOAD * INLINE [
Thanks In Advance.
Please find the QVW for the reference.
=if(GetSelectedCount(Area)=0, '("'&Concat( DISTINCT Area,'"|"')&'")','("' & GetFieldSelections(Area, '"|"', 10000) & '")')
But why use Concat and GetFieldSelections at the same time? Why not sure Concat()?
Its just the sample data I have given. But my way of implementing it is different. In my datamodel if these two fields are associated, it will form a loop. And I only need to use it in one particular sheet. So I thought this would be the best option.
You need to also add this condition fr ALL selection (I mean if u select all then all should b selected in othr list box) if u go by Sunny's approach or go with popescu's approach..
It was really informative sunny ,expression helped me in passing multiple values..
Declare variable say: Try
=if(GetSelectedCount(Country)=$(VTotal country),'*','("' & GetFieldSelections(Country, '"|"') & '")')
Thanks for your response. All your inputs are really helpful. But I have a small problem here. I also want to display all the selected values in the text box. It works fine with your inputs but problem comes when I select all the values. Thank you sachin for the scenario you have mentioned. It worked for selection, but not for displaying. Could you help me on that???
Good thing is, I have achieved what I want by combining all the three replies from you guys..
=if(GetSelectedCount(Area)=0, '("'&Concat( DISTINCT Area,'"|"')&'")','("' & GetFieldSelections(Area, '"|"') & '")')
With the above code in text box, I am getting result "ALL" when everything is selected.
Do something of this sort and cheat the expression as per need..
=if(GetSelectedCount(Country)=$(VTotal country),Concat(Country,'|'),'("' & GetFieldSelections(Country, '"|"') & '")')