Forum Academy Marketplace Showcase Pricing Features

Many to many relationship results in repeating group using Unique ID's?

I have got this table with a many to many relationsship.

Events EventUsers Users
name events firstname
datetime users lastname

Now I want to show records of Events in a repeating group. I think it should be rather easy, but can’t figure out how to do it.
How do I set up this search query? Or do I need to use Unique ID’s to solve this problem.

Anyone who can help me?

What exactly are you trying to do? And what are you having trouble with?

I try to show Events in a repeating group.

I only want to show events where a User is added by using table EventUsers.
So I have for example Event 1.
In Table EventUsers I added a record for User 1 and a record for User 2 so my system knows they are allowed to see the current Event. And there’s for example Event 2. Where only User 2 is allowed to see the info.

Now I want to make a repeating group where depending on the use the correct events are shown.

I can’t figure out what how to filter / search the correct records. I know how it works with a one to many relationship, but I don’t understand how to do it with a many to many.

The RG should have a content type of Event…

For the datasource, do a search for EventUsers, with a constraint of User = Current User, then add ‘each Items Event’

Thanks for thinking with me:)
I tried it. But I get this error:

Schermafbeelding 2022-05-13 om 14.05.17

These are settings I now have:

As I said, you need to select :each item’s Event in the datasource…

Thanks so much! I didn’t understand this. But now I do. :grinning:

1 Like