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

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
jonathandienst
Partner - Champion III
Partner - Champion III

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

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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
Anonymous
Not applicable
Author

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

pfa sample

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.