Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
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?