Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Button to select values from a list box

Hi Experts,

I have a requirement where based on two input boxes(min and max) values should get selected from a listbox.

I have set the values of variables and modified short charts and tables and on click, the data is changing.

But, there are too many charts and also, some expressions are quite complex and fitting the formula in all charts is not becoming possible.

Is there a way, that once I set values for the min and max input boxes and hit enter, the in between values get selected by default from the list box. This would automatically drill-down the data in all tabs and serve my purpose.

As of now, I am able to populate a listbox with just the in between values and these values need to selected manually. I want these to be selected automatically.

Thanks in advance.

Regards,

Nayana

1 Solution

Accepted Solutions
Kushal_Chawda

Create two variable vMin & vMax.

Create a button-> go to properties-> Action -> Select In Field -> Your Field

Search String      ='>='&vMin&'<='&vMax

View solution in original post

7 Replies
swuehl
MVP
MVP

Try a button with an Select - Select in field Action

Field Name should be your field used in the list box.

Then, as search string use something like

='>$(min)<$(max)'

where min and max are your two variables you are using to define the range.

Anonymous
Not applicable
Author

Hi,

Maybe try:

1. First create two variables  vMinYear and vMaxYear

2. Next create two Input boxes with these variables vMinYear and vMaxYear

3. In the list box  properties -> General Tab -> Field -> expression:

           =if( Year >= $(vMinYear)  and  Year <= $(vMaxYear), Year )

Regards,

Neetha

Not applicable
Author

Thanks for the reply Neetha.

I have exactly done this only.

My problem is that the listbox shows the values falling in this range.

But they are not selected by default.We would need to manually select a/all values.

I need these in between values of the listbox to be selected by click of a button or an enter.

Hope you get my problem.

settu_periasamy
Master III
Master III

Hi,

Did you try the swuehl suggestions?

It will select the values instead of showing the range..

Kushal_Chawda

Create two variable vMin & vMax.

Create a button-> go to properties-> Action -> Select In Field -> Your Field

Search String      ='>='&vMin&'<='&vMax

maxgro
MVP
MVP

you can use some variables trigger and the swueh's answer

see attachment

Not applicable
Author

This worked, thanks a lot.