Select list to be dependent on the value from the other list

For example, let’s say I have a state list, and the city list, and want the dropdown list for city to only offer options that correspond to the state selected. Could anyone help me with this? Thank you.

Without knowing more about your doc and how it’s built, you might want to test a formula in the selectable items of the select list for your cities something like this :

[ThisTable].Filter(State=ThisRow.State).Cities

But depending of your current doc, it might not be as simple :wink:

Link to my doc: https://coda.io/d/Excersises_datCRxQLBtO/_su-__

Ok, so based on your doc, I recreated it and I think this is what you’re looking for :wink: .

In the Items settings of your Lookup field, you just needed to add this formula :

State.Matches([State contr])

Note that I used Matches() because it works well with external control :wink:

Hope this help :slight_smile:

1 Like

Super! Thank you very much! I have also noticed it works only when dropdown has multiselection off. How would it be if I would like to turn it on?

You’re welcome :slight_smile: !

I’ve just tested this and it seems to works just fine with the control State contr as a multi-select :wink: and the Matches() formula in the items settings of your Lookup field in [Data] .

yep it works on mulit-select too. my bad. thank you very much!

1 Like

You’re welcome again :grin: !