Formula: List all rows that contain "X" in row "X" of the same table

Hello.

I have a table “Organisations” with the following fields:

  • ‘Organisation’ (text field)
  • ‘Organisation Type’ (single-select)
  • ‘Network’ (linked field, linked to the same table)
  • ‘Members’ (-> to be filled)

Let’s only look at Organisations of the type network. They will be linked in various rows of other organisations that a part of the network.

Now, for Organisation X, I would like to see in field ‘Members’ all ‘Organisations’ that have “Organisation X’” in field “Network”. Note that the field “Network” could contain more than one link.

Can anyone help me with setting up the formula?

Hey @Mary-Lou, Hiram here :wave:

Q: Does it specifically need to be a formula? I ask because I think you can get the results you want more easily using filters.

I mimicked your data set like this:

Then, I added a filter with the following condition:

In my case, this gives me the result of all organizations that have Disney in their network:

Let me know if this is what you’re looking for.

Hello @HiramFromTheChi,
Thank you, but it’s not what I was looking for.
I am afraid I was not clear enough.
I will try to rephrase my question later on.

@Mary-Lou Okay, let us know. :slight_smile:

Here’s the formula way, just in case this is what you’re looking for:

Formula: if(contains(field('Organization'),field('Network')), 'In network', 'Not in network')

Hello again @HiramFromTheChi,

Not exactly.

Let’s say in your example only “Ford” has the Organization Type “Network” (not in your table).

The formula I would like to have should list all ‘Organisations’ that have ‘Ford’ linked in the Network column. I understand that I can easily filter the Network column to get the results.
But I would like to see in “Ford”'s row in a separate column which organisations belong to their network.

This would require identifying all rows that have “Ford” in field “Network” and the pasting the Organisations in field “Formula”.
Ideally, obviously it would check for each row name whether it is linked in the Network field of other organisations and retrieve those.

Perhaps my colleagues @cwinhall @frederikdc can get a better understanding of this.

I think what I am looking for is a vertical search, which does not seem to exist within a table.

Hi,

This is indeed a scenario where you want to have a vertical search. Unfortunately, a vertical search is one of the only things that spreadsheets do better compared to databases.

There is a workaround here, but it is far from ideal. You can create 2 tables with the exact same data:

  • Organisations: contains all organisations
  • Network: contains the same organisations

Linking the Organisations and Network table with a Link to table field links them in both ways. So, in the Network table, you can immediately see which organisations belong to your network.

But again, you need to have some kind of automation to ensure that both tables are kept in sync. So, I am not sure if this solution could work for you.