Many to Many relationships and showing data between them - infinite loop visible

Hi

I’m hitting an issue of being unable to view data between two databases with a many-to-many relationship.

I have two tables, runs and users. A user can have many runs and a run can have many users.
When I create a screen showing a specific run and want to show a list of users assigned to it, I get the below screen:

This is using an avatar list, where I’m trying to set the text value to be the name of the users linked to the current run.

I’m unable to pull the names of the users assigned to the current run, but only see the distance field. I also have an infinite loop of links from users to runs back to users, which looks like a separate bug.

Is there something I should be specifically setting to see all of the user fields for the current run?

Hi Asher,

Welcome to the community :partying_face:

So you have a list of runs and when clicking a run you are going to a new screen. And in there,
there is a list of users that belongs to the current run. Then you can connect the list to the Users collection and add the filter from All users to Current Run > Users and rename the title,susbtitle as Current User>email,name from magic text.

Thank you

Hi Dilon - I can only do the first part.

If you look at the picture on my original message, then you can see that I don’t have access to any of the fields from the Users table assigned to the current run.

I also shouldn’t be seeing an infinite loop from Users to Runs, which I’m also showing in the picture.

First part means connecting to the Users collection? Then change the filter from all users to current run> users.

To show many to many you need lists because it’s an array. But if you have one to many relationship then you don’t need a list and you can add Current Run> User’s> name because it’s not an array. Only one user.

Hi @AsherL

I may be mistaken, but it seems like you may be confusing setting the datasource with the setting each item using magic text. I just replicated the logic and it works fine:
AdaloForums7322

the list datasource:

and here is where you set the magic text to be current user > fullname


no need to go into runs again, you already did that when you set the list datasource.

hope this helps!

1 Like

Thanks Hanan for this great explanation! I created a video for this but unfortunately it processed now :slightly_smiling_face:

The Video :

Thank you

1 Like

Thanks for that image Hanan. It was originally unclear to me that the list of fields was specifically tied to the users for that run.

I did find a way to get it working yesterday and need to check if that is what I ultimately did.

1 Like