How to make a "2 ways" relation between tables?

Hi all,

I actually use a Airtable database for my app (Glide Pages) and I’m looking to go on a Glide only database (because the 3 minutes delay between each time Glide look for update on Airtable is just terrible for the user experience). And I was wondering if it was possible in Glide to have a “2 ways” relation between 2 tables ?

For exemple :

  • I have 2 tables : One for users and the other for teams

  • Trought a form I create a new team, in a field of this form (a choice for exemple) I can select one or multiple users of the users table

  • When the team is created, I want it to have a field (a relation field for example) that link it to all the users I selected previously

  • And, in the other way, I want all the users I selected to also have a field that link them to the team I created

But what I see in Glide is that the relation field only work in “one way” : if I create one in the teams table, I can link it users, but on the users table these users still not linked to the team, same in the opposite way.

For thoses who are used to Airtable : I just want to have a “Link to” field linking both tables, something very basic on Airtable and so surprised me when I see it was, at first looking, not possible in Glide.

If anyone can help me with this i would be very glad ! Thanks in advance !

  • Configure your choice component so that it writes a comma separated list of UserID’s (RowID) into a column in your Teams table (you do this by enabling multi-select)
  • Add a Split Text column in your Teams table that targets the column containing the UserID’s
  • Now create a multiple relation column in your Teams table that matches the split text column with Users->RowID
  • And in your Users table, create a multiple relation that matches RowID with the split text column in your Teams table.

Each of the relations can then be used as the source of a list/collection component. For example, on your Teams detail screen you can add a collection and set the source as the relation in your Teams table, and that will give you a list of all users in that Team.

1 Like

Thanks for the fast answer ! Your solution worked as wanted !

1 Like

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