Skip to main content
All CollectionsTables and viewsTable basics
Subtables: display related row references as a table
Subtables: display related row references as a table

Add subtables to your tables to display relevant row references in a table format. Learn about when to use subtables and how to create them.

Updated over a month ago

Subtables are kinda what they sound like: tables within tables. But more specifically, subtables are a way to display row references as a table, within each row of another table. They allow you to view and edit another table's values without leaving your current table row. This article will walk you through how to think about subtables, when to use them, and how to create them.

Are you wanting to create brand new, one-off tables within a row, rather than view existing rows from another table? If so, you’ll want to use canvas columns instead. If you’re not sure which you need, jump to the section below.

Within this article you’ll find...


What are subtables?

A subtable is a table of values from another table, displayed in a single cell. Subtables require relation - or linked relation - columns. If you aren’t familiar with relations and linked relations, we suggest checking out the respective resources before diving into subtables.

If your table contains a relation or linked relation column, that column contains row references to another table. Normally those references appear as “chips” or “bubbles” that reveal more row information when you hover over them. But if you want to display those row references as a table - instead of chips - you can use subtables to do so.

Frame 1 (1).png

Subtables can only be seen when you expand an individual row, or when your table is displayed as a detail view (see more about view types here).

When to use subtables vs. canvas columns

There is technically more than one way to put a table inside another table. For instance, you can add a table (along with any other building block) to a canvas column. So how is this different, and when you should you use an actual subtable?

Here are some guidelines: use subtables (instead of canvas column tables) when...

  • the items in the subtable have a direct relationship with the row that they’re embedded in

  • you want to repeat the same pattern row after row

  • you want the values in the subtable to be automatically populated via a formula

For example, let’s say you have a Projects table and a Tasks table. For each row in the Projects table, you want to see all the tasks for that project. And you want to see those tasks as a subtable. Since each task is directly associated with a project, and you want this same pattern displayed for each row in the Projects table, you’ll want to use true subtables.

Here are some other examples of cases where you’d want to use a subtable:

  • Meetings and Updates → You have a Meeting table, where each row represents a unique meeting. You likely have multiple updates during each meeting, so you may want to create an Updates subtable for each person to add their updates.

  • Objectives and Key Results → You likely have both of these tables, with key results being tied back to certain objectives. Your Objectives table is your main table, and your Key Results can be a subtable within each objective row.

  • Travel Planner: Countries and Cities → One table for each, with cities being tied back to each country. Within each Country row, you can see a subtable of cities and their respective attributes.

The pattern each of these examples displays is having a top category and a sub category. For Projects and Tasks, Projects would be the top category, and Tasks would be the sub category.

Alternatively, if you want to create one-off tables within a row - where some rows will have a table, others might not, or the tables may follow different patterns per row - then use canvas columns. You can read more about canvas columns here.

Create a subtable

To create a subtable, you first need to have a column that outputs row references - also known as, a relation column or linked relation. These row references can be from the same table or another table within the doc. Refer to the linked articles for instructions on setting up those column types.

The column values can be derived from a formula, or they can be manually selected. But one important note: the column must be able to contain multiple values. In other words, the Allow multiple selections setting in the column options must be toggled on.

Once the above requirements are met, just follow these steps:

  1. Hover over any row in your table. To the far left, you’ll see an icon appear with two opposing arrows ↕️. Click this icon to expand the row.

  2. Once a row is expanded, find the column you want to convert to a subtable. Hover the column, and click on the column icon in the upper right.

  3. Under the Display as options, select Table. Then select which view type you want for the subtable.

  4. Now you have a subtable. You can customize this table, including sorting it, hiding/showing columns, grouping the rows, and more.

  5. That’s it! Now when you expand a row (or convert your main table to a detail view), you’ll see this subtable.

convert to subtable.gif

FAQs

Why am I not seeing something I added in a subtable in my parent table?

If you run into this issue, this may be because you have a filter on your parent table. Also note that if you set up your subtable with a filter formula, we automatically update new rows to match that filter requirement so it is not immediately filtered out of the subtable.

For example, if your filter argument looks like this [Table].Filter([Name] = "Monica"), all rows added to that subtable should automatically have the string "Monica" populated under the Name column so that the row shows up in your subtable.

To learn more about the filter formula, head to this article.

Can I add new rows via my subtable?

If your subtable column is calculated from a formula, then you will not be able to manually add rows to the subtable. But if your column values are manually selected, then you can add a row directly to the subtable, and it will show up in the main table that the subtable stems from.

How do I set up my subtable to be calculated by a formula?

Calculated columns allow you to use a formula to automatically populate values for your column. You can check out this article to learn more about the basics of setting up a calculated column.

Linked relations are a type of calculated column, and are the most common type for subtables. If you’re not familiar with linked relations, check out this article to learn how to get started.

Why am I not seeing the option to convert my relation column to a subtable?

This can be caused by a few things. First, make sure that your column type is properly set to a relation or linked relation column. Second, check to see that the Allow multiple selections setting for the column is toggled on. To find this setting, right-click on the column header, select Column options, and look under the Settings tab. Subtables can only be created in columns that allow multiple row selections.

Which display types can show subtables?

You will only be able to see subtables when your main table is displayed in detail view, or when you have expanded a row from your table. Learn more about expanded rows and row layouts here.


Related Articles

Did this answer your question?