Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regarding select all values in ListBox

HI All,

I have one List Box which contains Region Values : Asia, Europe, America.

My requirement is I have one Button (Which contains text “Select All Regions”),

When I click on Button All values in ListBox should be selected and Text on Button should change as “Clear All”, if I click on that button again all the values in the ListBox Should be Clear.

i tried it i can select all values in Listbox, But i can't Clear all the values.

Please can anyone help me on this.

Thanks,

Chiru

1 Solution

Accepted Solutions
orital81
Partner - Creator III
Partner - Creator III

See attached for solution

View solution in original post

4 Replies
ariel_klien
Specialist
Specialist

Hi,

try to create 2 buttons one to select all and one to clear all.

in the select all  button in the show condition put : GetSelectedCount(Your_field)=0

in the clear all button the show condition put : GetSelectedCount(Your_field)>0

BR

Ariel

Not applicable
Author

Hi Chiru,

here is the trick. First you have to define the varibale vToggleAction='SELECT'. Your Toggle-Button needs 3 actions.

The first action is "Clear field". The second action is "Toggle Select",  the second parameter is searchstring = if (vToggleAction = 'SELECT', '(*)', ''). The third action toggles the variable vToggleAction which controls the action, something like this: =if (vToggleAction = 'SELECT', 'CLEAR', 'SELECT').

The caption of the button is also controled via if (vToggleAction = 'SELECT', 'Unselect the fieled', 'Select all').

Hope that helps

Best Sacho

orital81
Partner - Creator III
Partner - Creator III

See attached for solution

Not applicable
Author

Hi Ori Tal,

It's Working fine, Thanks for effort on this.

Thanks,

Chiru