Dropdown Menu Dependancies?

Hi all,

Absolutely hooked on Coda, I’ve been using it for a couple of different purposes and loving it’s potential! I’ll try share a few things I’ve done so far that I really like soon. :slight_smile:

One thing I’ve yet to work out how to do (if it’s possible at all!) is how to setup dependancies for drop down menus.

What I mean by this is, say I have a table with two drop down columns. I would like the second dropdown column to only show relevant options based on what was set in the first dropdown.

EXAMPLE:
Say I’m creating a drinks menu, and the first dropdown has ‘drink type’ and contains options like Hot Drinks, Soft Drinks, Alcoholic Drinks. I’d like the the second dropdown provides options based on that choice - so if a user selects Hot Drinks in dropdown 1, dropdown 2 contains things like Cappuccino, Latte, Tea etc, but not for instance, Beer, Wine, Coca Cola.

Is that sort of functionality possible?

2 Likes

Is this what you are looking for @Josh_Unwin1

3 Likes

Hi Mallika, I’m not sure if that’s what Josh was looking for, but this has been what I’ve been wrestling with for the last half hour. Would be great if you could explain the steps here!

@Stan_Schalij - here you go. Let me know if you need any breakdown or explanation here. I used an If statement in the Options Select List.

The formulas I used
Type column in Selection Table is a select list - [Drink Type].Type
Options is - If(Type.IsBlank(),[Drink Type].Drink ,[Drink Type].Filter(Type=thisRow.Type).Drink)

2 Likes

Thanks so much for helping me! This works great, but sadly it breaks some other stuff: I think I can do a workaround with what you’ve thought me, but maybe you can help clear some it up:

Basically I’m running into problems when I try using the select list option with the Type being formatted as Lookup from Table. Recreating the shape of my setup with drinks:

  • In the Selections table I have a column called “Name”
  • In Drink Type I have a column called “Abbreviations”

Now, in my initial version I had “Type” formatted as Lookup from Table, allowing me to include [Drink Type].Abbreviations in the concenate I had in Selections.Name. (Including some other stuff from my version of the selections table). The Select List workaround seems to run into some problems when trying work with the lookup, and adding a big if statement for the abbreviations feels bloated.

I feel like the problem has something to do with the way the Filter is set up, but I’m not quite sure.

image

Can you share this doc with support@coda.io and I’ll take a peek.

1 Like

For the curious -

If [Selections].Type is a Lookup ( and not a select list as I have in my example) then is the the formula for Options is

If(Type.IsBlank(),[Drink Type].Drink ,[Drink Type].Filter(Type=thisRow.Type.Type)).Drink)

1 Like

Sorry for the delayed reply @mallika thanks a lot, that is what I was looking for! I’ll have to experiment with this when I’m next working on that particular doc!

And here is another way of doing this by making Type in both tables a Lookup -

2 Likes

Hi. I’m having trouble to apply this to my Doc.
Probably I’m doing something wrong, I’m a beginner user.

Could you please take a look.
Also when I use Lookup format (from ‘Marca HD’ table) to the "Marca"column in the hard drive table I get the values twice…

I’m enjoying CODA a lot! I see so many possibilities!

Thank you

here’s the link to the doc:

@Joana_Reis

See if this is what you want.

If so, study each table, column, and formula to see how it all connects.

Hi Ander. Thanks a lot!
I noticed where I was wrong.

I was trying not to create more tables, but I got it now!

Thank you so much!
cheers from Brazil!

1 Like

Hi there!

I’ve been trying to make this work but I can’t figure it out. I wonder if it’s possible in my case?

  • I have a table full of cards which represent work called “cards”
  • I have a Lookup field which allows you to choose a row from another table called “sprints” - each of which denotes a sprint that a card can be added to
  • I want the drop-down to let users choose which sprint to add the card to
  • But I don’t want the dropdown to include sprints which have been closed. This is currently denoted by a “Sprint status” column in my “sprints” table

Is this possible to implement? it looks like this dependency feature can only filter options if the data is already a field in the table - which wouldn’t help here.

Thanks for your help!

Dear @James_Naylor,

It would be great if you where able to share at least a dummy copy of your doc, where you explain the desired results.

I’m sure you will find someone giving a helping hand :handshake:

UPDATED: NOW WITH CORRECT LINK

Hi @Jean_Pierre_Traets!

Ok sure thing! Here’s a copy to a special dummy version I made: https://coda.io/d/Dummy-copy-of-Jamess-sprint-planner_dzx8lad6Psj/_sued1

You’ll see I have a sprints table with all the different sprints named by their start date and then also a cards table with the individual items of work.

What I want is wherever you choose the sprint for the card, those that are set as “Previous sprint” in the sprint table don’t show up.