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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Two List List Box

I have 2 list box as follows

List Box 1          List box  2

Dept                   Branch

A                          1

B                          2

C                         3

                             4

                              5

                              6

                              7

                              8

                              9

Branch 1,2,3 come under Dept A

Branch 4,5,6 come under Dept B

Branch 7,8,9 come under Dept C

My requirement is to show Branch 1,2 and 3 in Branch List box if I select Dept A and so on

Pls help to write the expression for thisw

16 Replies
ashfaq_haseeb
Champion III
Champion III

Or may be like this with same table.

Regards

ASHFAQ

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

There is a thread here that may have some interesting thoughts in it for you:

Multiple Column Listbox

The application referenced can be found here:

QlikView App: Multi Column List Box

This shows how you can use a table box and set various properties in order to make the table box behave like a list box.  Using these techniques you could have values highlight green when associated values are selected.  I would recommend that you don't go with exactly the same colour as selections - as that is going to give false messages to the user.

Hope that helps.


Steve

PrashantSangle

Hi,

Checked Enclosed File.

It is as per requirement.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
upaliwije
Creator II
Creator II
Author

Thanks all for your help

evan_kurowski
Specialist
Specialist

Hello upali,

I know I'm late to this thread, but I wanted to suggest an additional option.

If you aggregate a field value over itself it has the effect of producing a result similar to a "hypothetical" GetPossibleValues() function, but in an array form.  When placed in a listbox this will produce a dynamically resizing listbox that never shows excluded values, nor leaves blank greyspace.  (and since this calculation is driven by the Only() function, this method accepts set-analysis)

Try this expression in a list box:

=AGGR(Only(Branch),Branch)

MarcoWedel

Nice one.

QlikCommunity_Thread_132226_Pic5.JPG.jpg

regards

Marco

evan_kurowski
Specialist
Specialist

If you've ever had the scenario with the extremely large field and 'Hide Excluded' leaves you potentially millions of greyed out blank rows of empty scroll space this can help.  In the event sorting or sort expressions may be giving issue and dispersing your associated rows throughout a giant scrollspace, this bubbles a distillation of possible only to the top.

Works well with Multi-Box too.  Sometimes prevention of end-user selection of undesirable values is done by applying KEEP type of reductions during scripting.  Allowing the full dimension list to load and then reducing by this technique can work too.

i.e.  =Aggr(Only({<Dept={$(vMyAllowedDept)}>} Branch), Branch)