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: 
nafi_qlikview
Partner - Contributor II
Partner - Contributor II

Weird behaviour in filtered list box

Hi,

I've got two tables:

Table1:

KEY, FIELD1

1     , ...

2     , ...

...

Table2:

REFKEY, FIELD2

1            , ...

1            , ...

2            , ...

...

FIELD1 is shown in a normal listbox and once a value is selected, I want a second listbox to only show those values of FIELD2 where REFKEY = KEY. This works if I use the following expression for the second listbox:

If(REFKEY = $(=KEY), FIELD2)

However, I've noticed that when I actually select a value in listbox 2, not only FIELD2 in the underlying table gets actively selected (green), but also REFKEY (where value = KEY).

Is this behaviour expected?

I've managed to work around this 'problem' by using:

Aggr(Only({$ REFKEY={$(=KEY)}} FIELD2), FIELD2)

but was still a bit confused as to why this happened in the first place. In the second approach only FIELD2 is actively selected, the corresponding REFKEYs are only marked as possible (white, as expected).

Any thoughts on this would by appreciated.

Martin

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Yes, that behavior is expected. All the field values of the fields used in the expression are selected.

What you should do instead imho is rename REFKEY to KEY so your tables are properly associated.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Yes, that behavior is expected. All the field values of the fields used in the expression are selected.

What you should do instead imho is rename REFKEY to KEY so your tables are properly associated.


talk is cheap, supply exceeds demand
nafi_qlikview
Partner - Contributor II
Partner - Contributor II
Author

Thanks, didn't expect that.

I can't associate them because then the unwanted options (those which don't correspond to the selected FIELD1) only show as excluded. Once a value in FIELD2 has been selected, the remaining options corresponding to FIELD1 also show as excluded and hence aren't distinguishable anymore.

I want to properly hide them and 'Hide excluded' doesn't do the job as it only hides the descriptions but still reserves the spaces and doesn't solve the issue of distinguishing 'valid' options.

Anyway, it answers my question so thanks! Do you happen to know what the idea behind this is?