Yes unfortunately those are not helping me…I’m clearly missing something in my brain.
In a normal database I’d have 3 tables: members, events, memberevents – I’m just not seeing how 3 sheets then map using this relational column concept and still show me the values i want
It was a long time ago and some current features were not available then… Here is a link to the sample app: https://many2many-norep.glideapp.io.
Take a look to the data tables in the app. You will find 3 tables:
Events table: you list of possible events.
Participants table: your list of members.
Attendees table: your list of “memberevents". When a member chooses to go to an event, you create a row in this table.
Instead of creating a "many-to-many” relation between Events and Participants, you should create 2 “one-to-many” relations:
Events(1)-to-Attendees(many): one event can have relate to many member-event pairs (or have many participants).
Participants(1)-to-Attendees(many): one member can relate to many member-event pairs (or "be an attendee” to many events).
When a member chooses to attend an event, you just need to create a new member-event pair in the Attendees table. You can traverse the relations to grab data from the related tables using LookUp columns.
Thanks @Alfonso_Aguilar this is helpful to look at – I’ve made more progress. Now trying to display the right things on the form is hard:
Done - I want a Member screen that shows the name of all events they are getting
Done - A list of events
Not figured out - Look at the event details and show a list of names that are registered (not the unique key) and allow link to the details of that member
Notice that to reach the Participants table from the Events table you have to traverse 2 relations: Events-to-Attendees and Attendees-to-Participants. For your reference,I have added a new LookUp column to the Events table in the sample app. You may need to get an updated copy of the app (link: https://many2many-norep.glideapp.io/).
Please, have a look at it and try to do the same in your app:
Step 1. In your Events data table, create a LookUp column and configure it to reach into the Participants table through the necessary relations (Events-to-Attendees > Attendees-to-Participants).
Step 2. In your Events layout, select the LookUp column created in Step 1 as the source for the values in the list of attendees.
Step 3. You should now see and be able to use Participants data to populate list entries.
Step 4. By default, tapping on any entry in the list will show the Participant details (you can change this by selecting a different action in the list Features tab).
This worked for me… but whoo I wasn’t going to come up with that for myself.
I had exactly the problem of two hops to get past the linking table, I didn’t think of doing the hops in the data tables
After a little experimentation I figured out a method for a natively supported many-to-many relation without using a linking table.
There is a calculated column type called “Split Text” that makes the magic happen!
Here’s my methodology:
Create a choice UX element on table A which allows you to select multiple items from table B storing those table B IDs as comma separated text on table A.
Create a “Split Text” column on table A which reads your table B IDs and splits them into an array of multiple text objects each with a relevant table B ID
Create a relation between table A and table B linking on the split text column
When displaying objects from the related table (A->B OR B->A) use a “contained in” or “contains” filter to check for all not just one object.
Bonus) If you’d like to display this list of related objects in context, create a “Joined List” object to concatenate the relevant text into a single text field and display it as a single field.
Honestly It’s beautiful. Thank you Glide team for the split text column type!
-AVF
Here’s a use case question, what happens in the case where you have teams with members with each member have different roles (ie. admin, manager, etc), how does that work?
In a normal database, you would create teams, members, team_members so it sounds like that would be different in Glide, is that correct?