Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: List box restriction

Hi,

Try this expression in list box

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

Regards,

Jagan.

Re: List box restriction

Hi jagan

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

Not applicable

Re: List box restriction

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

MVP
MVP

Re: List box restriction

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.

Re: List box restriction

Hi

You can event try other way around

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

Regards

ASHFAQ

MVP
MVP

Re: List box restriction

Hi,

Try like this

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

Regards,

Jagan.

Re: List box restriction

or maybe

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

regards

Marco

Community Browser