Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Limit the number of items in a List Box

Hello,

Do you know how can I limit the number of items in a List Box ?

I mean, I have 5 products (A, B, C, D, E) and two list boxes. I want the first List Box to only show products A, B, C. Then I want the second List Box to only show products C, D, E.

Thks,dani

1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

A solution is attached

View solution in original post

8 Replies
alexandros17
Partner - Champion III
Partner - Champion III

You have to use a sorting or a logic to divide the grups so write in the first listbox:

If(product <= 'C', product, null())

in the second

If(product >= 'D', product, null())

Not applicable

Try using something like this in your list box expression:

=if(match(Product,'A','B','C'),Product, null())

maxgro
MVP
MVP

// A B C

=if(match(Product,'A','B','C'),Product)


// not A B

=if(not match(Product,'A','B'),Product)

MK_QSL
MVP
MVP

You can create an Inline Load ...

Load * Inline

[

  Product, Flag

  A, 1

  B, 1

  C, 1

  D, 2

  E, 2

  F, 2

];

Now Use

IF(Flag = 1, Product)

IF(Flag = 2, Product)

nagaiank
Specialist III
Specialist III

A solution is attached

danialier
Creator III
Creator III
Author

excellent !!! many thanks for the attachment !

aveeeeeee7en
Specialist III
Specialist III

Hi Dani

See the Attached.

danialier
Creator III
Creator III
Author

I really like that approach ! Thanks !