Skip to main content
All CollectionsTables and viewsColumns & column types
Connect tables with relation columns
Connect tables with relation columns

Learn how to use relation columns (formerly Lookups) to connect tables in Coda. Easily reference another table directly from within a row.

Updated over 2 months ago

Relation columns - formerly known as Lookup columns - allow you to reference a table from within another table. For instance, let’s say you have a table for your projects and a table for your tasks. For each task in your tasks table, you may want to indicate the associated project. Or maybe you have a recipe table and an ingredients table - and you want to link the two together. With relation columns, you can easily reference another table directly from within a row. This allows you to connect your data in powerful ways, maintain consistency, and so much more.

Within this article you'll find...


Create a relation column

You can add a relation column to any table. To get started:

  1. Click the + symbol in the upper right corner of your table to add a column

  2. Type relation, or select relation from the options

  3. Select which table you want to pull from

You can also convert an existing column to a relation column by right clicking on the column header, click Column type, then find relation in the options.

💡Tip: When converting an existing column to a relation, you can choose to create a new table with the existing column data. To do so, follow the steps above but instead of choosing which table to connect to, click the +create new table option.

Now that column will be a dropdown list with all the options from the table you selected. You can click into any cell in that column to see the list and start selecting values.

If you don't see the values you expect when you click the dropdown, head to the table you're pulling from and make sure that the display column is set to the column you want. You'll know something is a display column when it has a bookmark option next to the header. To set a new display column, click the column dropdown and choose Set as display column from the options. Learn more about the display column here.

Explore row references

Once you’ve created a relation column and added values to it, you may notice that the data looks a bit different than other columns. Specifically, you should see bubbles that you can hover over to reveal even more information. These bubbles are row references from the referenced table. When you hover over them, you should be able to see data from the other columns of that referenced table - not just the display column. You can even click the arrows icon in the upper right corner to expand that row and explore the data it contains.

Relation column options

Like all columns, relation columns have a number of settings that allow you to fine tune the column to your needs. This includes things like allowing multiple selections per cell, pre-setting values for newly added rows, and more. To view these options, just right click on the header of your relation column, then select Edit column.

Here you'll find...

  • Linked columns. This section shows any other relation columns in your doc that are based off this column. You can read more about creating linked relations below.

  • Allow multiple selections. Toggle this setting off if you want to limit this column to one selection - or one row reference - per row.

  • Display as. Choose whether to display the values themselves (Value), or to instead display a button that can be clicked to show the full details (Open button). The Open button option is a good choice if you want your table to feel less visually crowded. Note that you can only select the Open button option if Allow multiple selections is also toggled on.

  • Value for new rows. Here you have the option to specify a default value for this column, which will be applied whenever a new row is created. You can select specific values from the dropdown, or even use a formula. This default value can always be edited, removed, or added to after the row is created.

  • Option settings. Here you can adjust what you see in the dropdown menu of your relation column. You can apply sort order, add filters, and apply styling. You can also choose whether to allow quick adding of new options. When this is toggled on, you can add rows to your referenced table directly from the relation column.

💡 If you want to automatically fill the rows of your relation column - without having to manually add values - click into the Fill values tab of the column settings. Learn more about filling column values with formulas here.

Add related columns

Once you’ve added a relation column, you can quickly add other columns from the referenced table. For instance, you have a Tasks table and are displaying related Projects via a relation column. But you also want to pull the quarter for each project into your tasks table. Easy!

Just right click on the header of your relation column, then select Add related column.

You can then choose which columns to add to your table. Note that these added columns will be formulaic columns, and they’ll default to whatever column type the original column is. If you’re curious, you can click into the formula to explore.

Create linked relation

A common pattern is to do a linked relation. Linked relations allow you to add columns to the referenced table which show where else the data has been referenced. You may want to find out for every Team Member, which tasks are assigned to that member, or the total duration of the tasks they have signed up for, or perhaps you want to summarize your table data. We've created a dedicated article just for linked relations, how to create them, and how to use them - check that out here.

FAQs

Are relation columns the same as lookup columns?

Yes - just a new name (plus some improvements)! Relation columns were formerly called “lookup columns.” We made the change to more accurately represent what these columns do.

Is there a way to limit the items that show up in the dropdown menu of a relation column?

Definitely! You can do by adding a Filter within the Option settings of the column settings (see the Relation column options section above). You’ll see options for preset filters, or you can get fancy and add your own formula.

How can I make my relation column display as a subtable?

Good news - we have an entire article on subtables. Check it out here.

How are relation columns different from select list columns?

Relation columns reference other tables. They contain rich references to entire rows of that other table. Select lists, on the other hand, are pre-set lists of data stored within the column settings. They contain simple text values.


Related resources

Did this answer your question?