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

Restrict contents of list box

Hi. How can i restrict contents of a list box based on the selection made in another list box. Say i have a list box with State names Ex: Karnataka, Andhra Pradesh, Rajasthan etc., and another list box with city names. If i select Karnataka in the first list box i should be getting only the cities in Karnataka state in the second list box. Any idea?

1 Solution

Accepted Solutions
MVP
MVP

Re: Restrict contents of list box

Hi

Click "Hide Excluded" on the list box properties; or select Expression in the Field list and enter the expression:

     =Aggr(City, City)

(not the expression tab)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
3 Replies
MVP
MVP

Re: Restrict contents of list box

Hi

Click "Hide Excluded" on the list box properties; or select Expression in the Field list and enter the expression:

     =Aggr(City, City)

(not the expression tab)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
shekharnil
New Contributor III

Re: Restrict contents of list box

The problem you have stated requires the use of heirarchy.

Either you declare a heirarchy for the city - state or you can define a table with city and state as the column.

without defining a relationship between the city and state you will not be able to filter out the unselected cities from the listbox.

eg.

City State

 
Tripura
AgraUttar
  Pradesh
AhmedabadGujarat
AhmednagarMaharashtra
AizawlMizoram
AjmerRajasthan
AkhnoorJammu and Kashmir
AkolaMaharashtra
AlandhaKarnataka
AlandiMaharashtra
AlangGujarat
AlappuzhaKerala
AligarhUttar
  Pradesh
vikasmahajan
Honored Contributor III

Re: Restrict contents of list box

pfa sample

Community Browser