Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
gautik92
Specialist III
Specialist III

Listbox

I have a listbox with list of products which have mappingid 0 and 1

I want to show those products which belong to 0 and 1 seperately in the listbox .

Thanks in advance

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like this


UI:

Listbox1 - Expression: =Aggr(only({1<maapingid= {1}>}products ),products )


Listbox2 - Expression:  =Aggr(only({1<maapingid= {0}>}products ),products )


Or


Bring in script itself

If(mappingid = 0, products) as Product1

If(mappingid = 1, products) as Product2

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
vardhancse
Specialist III
Specialist III

So you want 2 separate list box one having mappingid=0 and naother mapingid=1

the create one list box->Properties->expression->if(mappingid=0,product)

Another list box->Properties->expression->if(mappingid=1,product)

MayilVahanan

Hi

Try like this


UI:

Listbox1 - Expression: =Aggr(only({1<maapingid= {1}>}products ),products )


Listbox2 - Expression:  =Aggr(only({1<maapingid= {0}>}products ),products )


Or


Bring in script itself

If(mappingid = 0, products) as Product1

If(mappingid = 1, products) as Product2

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
tyagishaila
Specialist
Specialist

Hi,

for this you can use expression in ListBox rather than field name.

gautik92
Specialist III
Specialist III
Author

Untitled.png

I want two seperate listboxes not lik this

The formula whic yu have given shows lik this

PrashantSangle

Hi,

If mapping id field and Product from same table then

create new field in script

try like,

if(MappingId='1',Product) as Product1

and

if(MappingId='2',Product) as Product2

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂