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

dinamically populate list box

Hopfully very simple question:

I have a table Metrics with 2 columns:

ID, Value

1, One

2, Two

3, Three

....

And I have a variable "Flag" with two possible values: "Choice 1" and "Choice 2".

How do I create a listbox that will be populated with values "One" and "Two" if variable "Flag" = 'Choice 1', and only value "Three" if variable "Flag"='Choice 2'?

Thank you!

3 Replies
Not applicable
Author

why don't you simply join this two tables?

LOAD * INLINE [

    ID, Value

    1, One

    2, Two

    3, Three

];

left join LOAD * INLINE [

    Value, Flag

    One, Choice1

    Two, Choice1

    Three,  Choice2

];

Not applicable
Author

That kinda works, but my listbox (where I display Value) shows all values. When I pick my Flag="Choice1", value "Three" simply gets greyed out.

What I need is ONLY display values in the list box that relate to "Choice1" if "Choice1" is selected in the variable.

In reverse, I need to display only value "Three" if "Choice2" is selected in the Flag.

Thank you!

Not applicable
Author

so change that listbox to tablebox with Value field only