Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Box Where Clause

Is there a function I can use for a List Box that would allow me to filter out options?

Basically I have a table of questions and answers that correspond to a survey. Certain questions are useful for grouping purposes and I'd like to have separate boxes for selecting them. So for example if I'd like to group on sex, state and race I'd want a box for selecting states another for selecting race, etc.

Currently my List Box displays all possible reply values regardless of the question. I figure I could build separate boxes if I could put a where clause specifying the question.

I don't want to create separate in line tables because I don't want the selection to be static and besides it seems unnecessary.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try as expression as shown in Swarups first answer:

=if(Question='State',Value)

Hope this helps,

Stefan

View solution in original post

9 Replies
Not applicable
Author

Am I able to load a new table by querying a table I just created in my script? So I create a table from a file and then load a table based off that table with criteria to filter out what I don't want?

swarup_malli
Specialist
Specialist

Hi,

yes you can, instead of field choose expression in the listbox properties...enter the filter condition..this will give you the solution..solution.png

Not applicable
Author

Can you give me an example of an expression? I'm not sure what function to use.

swarup_malli
Specialist
Specialist

Monkey house,

IF u tell me, what exactly u r trying to accomplish.. in short ..i can try to help..i didn't exactly understand ur post..

Regards

Swarup

swarup_malli
Specialist
Specialist

you can filter in the back hand by creating separate colums using if clause..

hope that helps

Not applicable
Author

So lets say my table looks like this:

Survey / Question / Value

1 ; State; OH

1; Sex; M

1; Race; W

2; State; WI

2; Sex; F

2; Race; W

3; State; KS

3; Sex; M

3; Race; B

Suppose I want a List Box that would display all states in the table for selection.

State

----------

OH

KS

WI

I'm trying to find an expression or a way to show only the values that match the question I assign to the List Box.

swarup_malli
Specialist
Specialist

Monkeyhouse,

If you could attach a sample application, I would like to try to implemenrt ur req

Regards

Swarup

Not applicable
Author

I don't think uploading a sample will help because it wouldn't provide any additional insight as to what I'm trying to accomplish.

In simplest terms can I have a list box that limits values displayed based upon some criteria? Not greyed out but unavailable. Multiple list boxes could all use an expression on the same field but would display differently depending upon the filter criteria used.

swuehl
MVP
MVP

Try as expression as shown in Swarups first answer:

=if(Question='State',Value)

Hope this helps,

Stefan