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: 
Not applicable

List box restriction

Hi ,

Can we restrict the value in list box? Such as we just want to show the name with prefix L and hide the other name.

Many thanks and thanks in advance!

br,

Lisen

7 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression in list box

=Aggr(If(Name LIKE 'L*', Name), Name)

Regards,

Jagan.

robert_mika
Master III
Master III

Hi jagan

Why do we have the Aggr function as a first argument here?

Not applicable
Author

Hi Jagan

thanks for your help~

one more question~ can i use this expression to restrict the list with the value of another field? such as show the provinces which belongs to China and UK, and there are two fields: province and country.

thanks in advance!

br,

lisen

jagan
Luminary Alumni
Luminary Alumni

Hi Robert,

We can also do the same without using aggr() like below,  sometimes we will get issues without aggr() that is why I mentioned Aggr().  Aggr() is something like a loop.

=If(PREF_NAME LIKE 'S*', PREF_NAME)

Regards,

Jagan.

ashfaq_haseeb
Champion III
Champion III

Hi

You can event try other way around

=If(Name LIKE 'L*',Aggr(Name, Name))

Regards

ASHFAQ

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=If((Country = 'UK' OR Country='China'), Province)

Regards,

Jagan.

MarcoWedel

or maybe

Aggr(Only({$<name={"L*"}>} name), name)

regards

Marco