Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table that contains user IDs and list names like:
User ID | List Name |
---|---|
bob1 | list_one |
sarah2 | list_two |
gene3 | list_three |
I have created button that selects the User ID of the person using the app and brings up a "List Name" list box, which I want to display only the lists for the selected user ID. I'm guessing this needs to be done via an expression on the list box itself, but I don't know how to write this. So, let's say my user ID is "bob1." Right now, when I click the button, the "List Name" list box comes up, the user ID "bob1" is selected, but the list box lists ALL list names instead of just "list_one." Can anyone tell me how to do that? Thanks so much!
-Kenny
May be this as your list box expression
=Aggr(Only([List Name]), [List Name])
May be this as your list box expression
=Aggr(Only([List Name]), [List Name])
Hey Sunny, I think this will work...how would I rewrite it so that if "bob1" is deselected, then no list names show up. Would I just add some sort of null function somewhere? Thanks!
May be this:
=If(GetSelectedCount([User ID]) > 0, Aggr(Only([List Name]), [List Name]))
Or change the the list box for UserID to always have one value selected?
Mark
Hi Kenny,
The way I would do it is put all the names in to one field an then only show the listbox once a username is selected. This is done on the layout tab of the listbox properties. Set the connditional show to:
GetSelectedCount([User ID]) = 1
I would also set that listbox to "Hide Excluded" on the General tab of the listbox properties.
See the attached QVW.
-Josh
Qlik
Thanks for everyone's input. I actually used bits and pieces from multiple responses to come up with the best solution for my situation, so thanks to all!