Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ashishpalkar
Creator III
Creator III

List Box Association

Hi Expert

Please find attached QV document.

I have created 3 List Boxes

  Field

  Rank

  State

Field is combine list box of 'State' and 'Rank'.

What i am looking ,

When i Select/unselected any value from any of these list boxes , same action should apply on other list boxes.

e.g. If I select 'CA' from Field List box , State List box should highlight 'CA' , 

       If I unselected 'CA' from Field List Box, State List box should unselect 'CA' 

Thanks in advance.

15 Replies
Gysbert_Wassenaar

Why? When you select CA in either field then it will become the only possible value in the other field. If you deselect it in one field it will become a possible value again in the other field. Why does the 'selected' green color matter?


talk is cheap, supply exceeds demand
ashishpalkar
Creator III
Creator III
Author

Hi Gysbert

Thanks for reply, other than selected green color the main focus is on

If I unselected 'CA' from Field List Box, State List box should unselect 'CA' as well. 

Gysbert_Wassenaar

Why? There's no functional difference?


talk is cheap, supply exceeds demand
ashishpalkar
Creator III
Creator III
Author

There is difference, select 'CA' from field list box and use this expression and check the output

=if(GetSelectedCount(Field)=0,0,SubStringCount(Concat(Field, '|'), 'CA'))

this will return 1

=if(GetSelectedCount(State)=0,0,SubStringCount(Concat(State, '|'), 'CA'))

this will return 0

so there is no association

Gysbert_Wassenaar

So, use GetPossibleCount instead.


talk is cheap, supply exceeds demand
ashishpalkar
Creator III
Creator III
Author

GetPossibleCount will only give you number of values selected , not which values selected.

Gysbert_Wassenaar

GetSelectedCount won't give you the selected values either


talk is cheap, supply exceeds demand
ashishpalkar
Creator III
Creator III
Author

Is it possible to send sample QVW of your suggestion?

Gysbert_Wassenaar

Sure, you already posted it.


talk is cheap, supply exceeds demand