cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
5by5T
Frequent Visitor

Model-driven app Subgrid with Many-to-Many

Hello, 

I have a bit of a complicated table scenario that I'm hoping to get some help with.

 

I am using the Accounts table for Dance Studios. Each studio will have add a list of Dancers to their account (one-to-many). 

 

When a Studio would like to register for a Dance Competition. They will start a Registration form using the 'Registration table'. 

Each registration will have many Routines. So in the registration form, I have a sub-grid where they can add a new routine(s) to the Registration. 

 

Here's the part I'm lost on: Each routine can have many dancers (many-to-many), but they can only select dancers associated with their Studio's Account. I am struggling to make this form user friendly as right now they can add a routine, but I can't get it to allow adding several dancers from a many-to-many relationship to that routine, let alone filter it by that account. It's like a sub-grid create form that needs to contain a sub-grid. I'm also trying to avoid them navigating to an entirely new form, but perhaps that's not possible.

Any suggestions would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Z_Lukowski
Resolver I
Resolver I

Hi,

When I encounter problems like this with (M:M) and the logic starts to be too complex I'm following the idea of breaking M:M into 1:M and M:1 relationships. (I don't know if its recommended approach)

So in this case creation of Routines can be split into "Routine Object" which object can have:

M:1 Relationship with "Routine" M:1 Relationship with "Dance Studio" and 1:M Relationship with "Dancers", 

I don't think a "Routine" object can handle it alone, If you want to constrain this Object to grab only "Dancers" from a selected studio what should happen in new registration for another studio. I see also the possibility to Relate "Dancers" with "Registration" instead of "Routines" if that's possible. But If you need to have them related to specific Routines you'll probably need the Object in Between. 

 

How's that sound?

 

BR

Zbigniew

 

View solution in original post

2 REPLIES 2
Z_Lukowski
Resolver I
Resolver I

Hi,

When I encounter problems like this with (M:M) and the logic starts to be too complex I'm following the idea of breaking M:M into 1:M and M:1 relationships. (I don't know if its recommended approach)

So in this case creation of Routines can be split into "Routine Object" which object can have:

M:1 Relationship with "Routine" M:1 Relationship with "Dance Studio" and 1:M Relationship with "Dancers", 

I don't think a "Routine" object can handle it alone, If you want to constrain this Object to grab only "Dancers" from a selected studio what should happen in new registration for another studio. I see also the possibility to Relate "Dancers" with "Registration" instead of "Routines" if that's possible. But If you need to have them related to specific Routines you'll probably need the Object in Between. 

 

How's that sound?

 

BR

Zbigniew

 

rampprakash
Super User
Super User

Hello @5by5T,

 

You can filter the N:N Subgrid filter value. Please find my blog below

 

https://microsoftcrmtechie.blogspot.com/2019/10/nn-filter-subgrid-dynamics-365-mscrm.html

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,101)