Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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