Skip to main content
All CollectionsTables and viewsTable basics
Add subitems within your table
Add subitems within your table

Want to nest rows of your table within other rows? Learn how to enable and start using subitems in your tables

Updated over a month ago

With subitems, you can nest rows within a table. This enables you to break your work into smaller sections (i.e. subtasks) and adds another level of organization to your table. For instance, you probably have a number of tasks to complete for a given project. But within each task, maybe there are sub-steps that need to be completed. Subitems allow you to better organize and visualize for such situations.

Within this article, you’ll find...



How do subitems work?

In Coda, subitems are backed by self-relation columns, meaning relation columns referring to the current table.

More specifically, subitems require two self-relation columns:

  1. A parent column: this single-select relation column will contain the parent row of the subitem

  2. A subitem column: this multi-select linked relation column will contain the subitem(s) of the parent row

But don’t worry - you don’t need to create these two columns yourself. If these columns don’t already exist when you turn on subitems, they will be created automatically.

Turn on subitems for a table

📣 Note that turning on subitems and showing subitems are two different actions in Coda. When subitems are turned on, they are turned on for the table and all connected views. Once subitems are turned on, however, you do have the option to selectively Show (or hide) subitems for individual views. This section will explain both actions.

To start using subitems in a table, just follow these steps:

  1. Hover over the table, and click on Options in the upper right corner.

  2. Click into the Table display option.

  3. Toggle on the Show subitems setting.

  4. If the table has any connected views, you will see an option to Show for all views. Check this box if you want subitems to show for all views, or leave unchecked if you only want to show subitems in the current view. You can always change which views do or don’t show subitems later - check out the FAQs to learn how.

  5. If your table already has the two self-relation columns - as described in the section above - you have the option to select those columns here, in the Subitem column and Parent column. If you make no selection, new self-relation columns will automatically be created, and will be hidden.

  6. Click the Turn on subitems button to confirm

turn on subitems for table (1_13).gif

Subitems have now been enabled for the table. If you hadn’t previously created the two necessary columns for subitems (explained in the previous section), you will notice that two new hidden columns - titled Parent and Subitems - have been added to the table.

💡 Tip: You can also enable subitems for a table even more quickly by right-clicking on a row, and selecting Insert subitem from the menu. Then click Turn on subitems to confirm.

1_1 (83).png

Add subitems

Once you’ve turned on subitems, and are showing them in a table or view, you may be wondering how to start adding subitems. There are a few different ways you can do this:

  1. Right-click on any cell or row in the table, and select Insert subitem from the menu. A subitem will be added below the selected row.

  2. Expand the row to which you want to add a subitem (by clicking on the caret of that row), then click the + New subitem button that appears.

  3. Using the “handle” on the left side of a row, click and drag an existing row onto another row. This will add the dragged row as a subitem.

  4. Use the keyboard shortcut CMD + CTRL + SHIFT + =

add subitems by dragging (1_13).gif

Configure subitems settings

You can use the subitems settings to adjust your subitem columns, appearance, and more. Learn how below.

Configure subitem relation columns

You can adjust which relations columns are used for subitems at any time. To do so, hover over the table and click Options in the upper right. Select Table display. Find the Subitems section and click Settings. Then click Edit settings. Here, you can choose which column to select for the Subitem column and the Parent column.

Note that the Subitem column must be a multi-select relation column, and the Parent column must be a single-select relation column. Both relation columns must be self-relation columns, meaning they reference the current table.

Note: these columns must be the same for a table and all its views.

1_1 (84).png

Customize subitem appearance

You can update the placement of the subitems caret indicator by clicking Options in the upper right corner of the table, selecting Table display, then locating the Subitem display column field. Click into the drop-down, and select the column that the indicator should be attached to. By default, the indicator is attached to the left-most ungrouped column - but this can be changed to any visible column.

FAQs

How do I turn off subitems?

As a reminder, turning subitems on or off applies to the table and all its views, but subitems can be selectively hidden for individual views by clicking on Options in the upper right corner of the view, selecting Table display, then toggling off the Show subitems setting.

If you want to turn subitems off for the base table and all connected views at once, follow these steps:

  1. Hover over the table or view, and select Options in the upper right corner

  2. Select Table display

  3. In the subitems section, click on Settings

  4. Toggle off the Turn on subitems for table setting

turn off subitems (1_13).gif

Can I show subitems for certain views but not for others?

When subitems are turned on for a table, they are also turned on for all connected views. It’s not possible to turn on subitems for certain connected views while turning them off for others. However, it is possible to selectively hide or show subitems for each view.

To hide subitems for a specific view, hover over that view, select Options, click into Table display, and then toggle off the Show subitems option. This will hide the subitems from this view, without actually turning them off in the underlying table.

How can I change which columns are used as the subitem relation columns?

Subitems require two self-relation columns: a parent column and a subitem column. When you turn on subitems for a table, a parent column and a subitem column will be assigned. If you later want to change which columns are assigned, you can do so by following these steps:

  1. Hover over the table of view, and select Options in the upper right corner

  2. Select Table display

  3. In the subitems section, click on Settings

  4. Click the Edit settings button

  5. In the pop-up, you will see a Subitem column field and a Parent column field. You can click into each field to change the assigned column (including the option to create a new column).

    1. Note that only self-relations (relation columns that refer to the current table) can be utilized as the subitem column, and only linked relations (that also refer to the current table) can be utilized as the parent column.

  6. Once selected, be sure to click Confirm to save changes.

change subitem & parent columns (1_13).gif

What display types support subitems?

Currently, subitems are only supported for the table display type and for timeline views. They are not supported for detail views, card views, charts, etc.

Group 43.png

I’m trying to select a column as the parent or subitem column, but I can’t select it in the dropdown options. How do I resolve this?

This may be due to the column not being the necessary column type. The Subitem column must be a relation column (that references the current table), and the Parent column must be a linked relation column (that also references the current table).

How do subitems work when your table data is grouped?

If your table or view has grouping, you might be wondering how this works with subitems. For instance, let’s say the table is grouped by the Status column, but the subitems within a single parent row all have different values in the Status column.

Subitems will be grouped based on the value of the highest parent row. So if the parent row has a status of In progress, all subitems will also appear in the In progress group, despite their individual status.

By default, new subitems will inherit the group value of their (direct) parent item.

Group 47 (1).png

How do subitems and filters work?

If a subitem includes the value selected in the filter and has no subitems, it will filter out like normal.

If a subitem includes the value selected in the filter but the parent item does not, the table will display both the subitem and the parent item. The parent item will be slightly faded (aka a “ghost row”) to reflect that it does not contain the value selected in the filter.

Group 89.png

Can I reference subitems in formulas?

Not directly, but because subitems are built upon relation and linked relation columns, they contain all the relevant data, so you can reference these columns in formulas.

For example, if you wanted to hide all the subitems in Table 1, and the subitem relation column is called Parent, your formula could be:

Table1.filter(Parent.isblank())



Related resources

Did this answer your question?