Relate a table to itself

Hey, I’m trying to relate a table to itself, essentially so I can link a parent record with a record on same table. In this case, I have a database of associations which can be a person or a company, If a person is associated with a company, which I can do, when I click the company card, I want to see a table of related people, so I need to relate the table to itself, how can I do this in coda? Note I do not wish to sure 2 tables for this use case.

Hi Wayne,

You would need to have an additional column as a cross reference., so that in a row for a person, you can record the company that it is associated with.

I do something very similar in the below doc. It has a list of todo items, and a meeting is a special kind of to-do.

Once you have that relationship in place, you can filter on the “partner” table by company. There are different ways to do that, with a view that filter by company code, or by an additional column that uses a filter formula determine the relevant people.

Thanks, yes I have an additional column, on the record for person, I can select the company, however, I when I add another lookup on the company to relate back to the same table, I get nothing. The idea is to lookup any people where the this company has been associated and list them in a table. I can’t see how your doing this on the example?

Hi Wayne,

In the Todo table are, among others, meetings (companies) and meeting actions (persons).

You have view(s) to view the Todos filtered by meeting actions (persons), you have other view(s) of the Todo list filtered by meetings (companies).

Hopefully the video helps.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.