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

Limited listbox

How can I create a limited set listbox that only shows names that begin with the letters 'BA' for example? I'm trying to create a toggle to allow my charts to eliminate customers that have names beginning with a certain sequence of letters; I need to create the list box to create the appropriate bookmark and apply it to a button. Thanks in advance.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Create a list box, and instead of selecting a field, select "<Expression>". Enter if(left(name,2)='BA',name). You should then have a list box of names that start with BA.

There are other ways to handle what you want than a list box, button and bookmark, though. As one example, create a field, "Eliminate Customers With Names Starting with BA?" with value Y for customer names that DON'T start with BA, and null for customer names that DO start with BA. Or use the full name of the field instead of Y and display as a checkbox. If they select Y (or checkmark the field), all customers with names starting with BA will be excluded.

Generally speaking, I try to work with QlikView's normal associative logic and normal interface rather than adding buttons, macros, bookmarks, and so on. I figure that having a consistent, generic QlikView interface for each application will pay off in simplified user training. And it can be simpler for maintenance as well. If all of your applications are filled with buttons, of course, your users will be used to that, and that could then be the better approach in your case.

View solution in original post

6 Replies
johnw
Champion III
Champion III

Create a list box, and instead of selecting a field, select "<Expression>". Enter if(left(name,2)='BA',name). You should then have a list box of names that start with BA.

There are other ways to handle what you want than a list box, button and bookmark, though. As one example, create a field, "Eliminate Customers With Names Starting with BA?" with value Y for customer names that DON'T start with BA, and null for customer names that DO start with BA. Or use the full name of the field instead of Y and display as a checkbox. If they select Y (or checkmark the field), all customers with names starting with BA will be excluded.

Generally speaking, I try to work with QlikView's normal associative logic and normal interface rather than adding buttons, macros, bookmarks, and so on. I figure that having a consistent, generic QlikView interface for each application will pay off in simplified user training. And it can be simpler for maintenance as well. If all of your applications are filled with buttons, of course, your users will be used to that, and that could then be the better approach in your case.

Not applicable
Author

Thank you John! I was looking for a way to list these without a sum() function.

Not applicable
Author

As a quick follow-up, wondering how I'd go about listing all the names with 'BA' anywhere in the name. I tried the following expression, but it doesn't work. Can you advise? Thank you in advance.

=if(name='*BA*',name)

johnw
Champion III
Champion III

I think this:

if(wildmatch(name,'*BA*'),name)

Edit: or either of these:

if(index(name,'BA'),name)
if(substringcount(name,'BA'),name)

Not applicable
Author

This solved my question exactly. Thanks again.

Not applicable
Author

Sorted out a big issue for me too!!! Thank you!