All Collections
Tables and views
Columns & 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 a week 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.

add relation column IMAGE ONLY FADE.gif

💡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.

Frame 19 (1).jpg

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.

Frame 19 (3).jpg

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.

expand row reference.gif

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 Relation options.

Frame 23 (1).png
  • 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.

  • 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.

  • Add formula. If you don’t want your relation column to be editable, and you want the values for each row to be determined programmatically, you can add a formula to your column. Read more about Coda formulas here.

  • 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.

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.

add related column.gif

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?