Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
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.
Country:
LOAD * INLINE [
Country
India
Pak
Zimb
SA
USA
NL
CHINA
CAN
];
Area:
LOAD * INLINE [
Area
India
Pak
Zimb
SA
USA
NL
CHINA
CAN
];
Thanks In Advance.
Please find the QVW for the reference.
Try this:
=if(GetSelectedCount(Area)=0, '("'&Concat( DISTINCT Area,'"|"')&'")','("' & GetFieldSelections(Area, '"|"', 10000) & '")')
But why use Concat and GetFieldSelections at the same time? Why not sure Concat()?
Hi,
Please see the attached app. I have created an variable an put a trigger on selection.
if(GetSelectedCount(Area)<>0, '('&Concat( DISTINCT Area,'|')&')')
Best regards,
Cosmina
Or even this:
='("' & GetFieldSelections(Area, '"|"') & '")'
why don't you want associations between those fields?
Hello Marco,
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
VTotal country==GetSelectedCount(Country)
=if(GetSelectedCount(Country)=$(VTotal country),'*','("' & GetFieldSelections(Country, '"|"') & '")')
Sachin
Hello All,
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.
HI,
Plss attach latest file.
Will modify in text box n give u.
Sachin
HI,
Do something of this sort and cheat the expression as per need..
=if(GetSelectedCount(Country)=$(VTotal country),Concat(Country,'|'),'("' & GetFieldSelections(Country, '"|"') & '")')
Sachin
Write above expression in your text box.
It should work..
Sachin