Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Searching for multiple values in a listbox where field is based on expression

I have a listbox where the field is based on a expression (defined by a variable).

I am unable to search for multiple values. I have tried the following (106, 107 are two numbers that show up in multiple values):

  • 106|107
  • (106|107)
  • *106*|*107*
  • (*106*)|(*107*)
  • (*106*|*107*)
  • (106|107)

However when I make a brand new listbox with a fixed field, (*106*|*107*) seems to work fine. How do I make a listbox with a field based on expression allow for multiple search values?

8 Replies
ogautier62
Specialist II
Specialist II

Hi,

that works in a sheet with check option search,

* and |  ok

(you can hide dimension and it acts as a list box selection)

regards

sunny_talwar

What kind of expression are you using for the list box? Can this be moved to script because it might be straight forward to search like this for a expression based list box

Anonymous
Not applicable
Author

Hi Olivier, not sure what you mean. Where is the check option search?

Anonymous
Not applicable
Author

Hi Sunny,

The expression is literally just a variable

=$(vField)

The reason it is a variable is that I want the user to be able to choose what Field the listbox is showing. I just can't search for multiple values this way.

sunny_talwar

Will give it a try tomorrow to see if it can work...

ogautier62
Specialist II
Specialist II

Hi,

maybe I replied too faster,it works too in a listbox :

in a generic character research :

use () in order to use |

so for you (106)|(107)

or this :

but I don't how combine * with |

ogautier62
Specialist II
Specialist II

here :

but in fact it acts as a listbox selection with generaic character research

sunny_talwar

I am not sure what you are doing differently, but (107|108) worked for me where my list box expression is this

=$(=Dim)

And Dim is a field I used to determine which dimension I want to use in the list box object. Script is this

Table:

LOAD * INLINE [

    Dim1, Dim2

    107, 106

    108, 107

    109, 108

];


Dim:

LOAD * INLINE [

    Dim

    Dim1

    Dim2

];