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.
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:

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. 
1 Like
Hello,
If I want to do the same but not with the Current User option.
I have Projects/Activities/ and Project Activities as the join. I have a dropdown with Project IDs from the Projects table. I need the RG to pull the activities related to the selected in the dropdown project.
When I am trying to do what is suggested here, I do not have access in the constraint to the dropdown Project id at all. ie I want to say ‘Project ID = dropdown Project. Project ID’ but this is not available to me.
Can you help me how to achive it?