Two-way linked relation on same table

I am building a personal CRM and would like to denote connections between different people through a two-way relation on the same table.

e.g. if Anne and Bill know each other, I want to put Bill in the Connection field on Anne’s row, and have it automatically show Anne in the Connection field on Bill’s row

Right now I have to manually enter on both Anne and Bill rows (two steps). Is there a way to define on just one row and have it automatically appear on the other row (one-step)?

I have attempted a solution but run into circularity errors.

Thanks in advance for your help!

Hi @S_L

Please check the doc I shared. I think it might be what you are looking for.


Welcome to the community, and to Coda!

The wonderful thing about Coda, is that there are usually several aways to do things, allowing you to build exactly to your needs.

Shown below are two more ways to cross-reference tables.
In the tables Relationships and Demo Project, I make use of the Relation column type with two way editing enabled. This method allows for the creation of hierarchical structures as shown here. But does not have to be used in that way.
In the table Cross reference - No two-way I have not enabled two way editing. In this method some manual work is required.

Thank you both for your answers. It looks like there is no way to do this in a single column, correct?

If I use a “knows” and “known by” approach, it seems like it’s arbitrary how I decide whether Anne knows Bill or if Bill knows Anne.

Let me know if you have any other ideas!

Hi @S_L

What you want isn’t possible in Coda and in fact having everything in one column would not even make sense from the point of getting to know who knows who first as there is no indication in the relation column as who is the first one in the line. Does Brian knows Anna or anna knows Brian first?

With multiple columns you can concatenate/format in a third column who knows who.

Please explore the doc I shared and you will see that there are filters in the relation named “Knows who?” that based on who knows who FIRST then they will be filtered out so that we can establish who knows first someone.

If you are still confused we can jump on a short zoom and I’ll guide you through it.

Can you set up a Parent/Child relationship and then use it to do grandchildren as well?

Hi Cristian,

Thank you for taking time to post and explore my question.

In a nutshell - I’m just looking for Linked In-level of information of who’s connected to who. I’m trying to keep things as simple as possible - I don’t really care who knows who first and sometimes I have no way of knowing this :slight_smile:

It does seem that using at least two columns is maybe the only solution, but ket me know if you have any other ideas based on my clarification above.

Thanks again!

Hi John,

The setup as is is recursive, so you can do as many generations as you want to.

How would you relate Anna with Brian in a single column?

See my initial post :)… I’m wondering if some automation could achieve what I’m looking for?

If Brian is listed in the “connections” field on Anne’s row, then add Anne to the “connections” field on Brian’s row?