Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Urgent help needed

Hi All,

I have 2 list boxes. Whenever I make selection in one list box, Only few of the values in 2nd list box will be related to first one.

For Ex :

India Bangalore

India Hyderabad

India Chennai

US Chicago

US New York

Say there are 2 list boxes Country and City.

If I select India from country list box then only Bangalore, Hyderabad and Chennai from City list box are related to selected country.

Here what I want is, Cities which are related to selected Country must come at the top and then other cities.

Similarly if I select US then  Chicago,New York must come at the top and then other country cities.

Can anybody please help me how to do this??

1 Solution

Accepted Solutions
rustyfishbones
Master II
Master II

Try sort by Expression = City

2014-03-05_1210.png

View solution in original post

10 Replies
quwok
Creator III
Creator III

Believe what you are after is sort by state, go to List Box Properties > Sort and select the State check box in your Cities list box.

Not applicable
Author

Hi Kwok,

I have already tried it .. It doesn't solve my problem

Not applicable
Author

Is the 'State' checkbox for cities in 'Auto Ascending'? It usually works with that.

rustyfishbones
Master II
Master II

Try sort by Expression = City

2014-03-05_1210.png

Not applicable
Author

Actually, change it to ascending or descending on the State instead of Auto Ascending and check again

Not applicable
Author

Yes, State' checkbox for cities in 'Auto Ascending'.

It is highlighting the related elements not bringing them to the top of the list box.

rustyfishbones
Master II
Master II

You could create a List Box Expression for the City List Box

try this as LB Expression

2014-03-05_1217.png

maxgro
MVP
MVP

I think City listbox should be sorted by

State               Ascending    

Text                    A -> Z

Autoascending should also work but only when there is a vertical scrollbar; from online help

StateSorts the field values according to their logical state (selected, optional or excluded).

The Auto Ascending setting sorts the list box (or, in a multi box, the drop-down list containing the field values) according to State only if the list box contains a vertical scroll bar. However, if you enlarge the list box to show all values, the sort order State is completely switched off.
Not applicable
Author

Use the Hide Option on City....Right click on the city List Box and Tick the Hide option