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

Many-to-Many (N:N) Relationships Between Two Records of the Same Entity

Hello,

 

I want to create a relationship between 2 records which are of the same entity and then display this information in a useful way but having some trouble working out how to do this.

 

My context is that I would like to link many 'Case' records ('Case' being the entity) to each other. For example, I have four records, Harry Potter, Ron Weasley, Ginny Weasley and George Weasley. I would like to be able to show the connections between each of them (e.g. that they are friends or siblings etc.). I can do this fairly easily between two *different* entities by creating a relationship (N:N, 1:N or N:1) and then add a subgrid to the form].

 

However, when the relationship is between two records which are both the from the same entity, it only displays on one of the subgrids and not both.

 

I could use the 'Related' tab which comes up as a tab but I find this quite clunky and not a fun UX. This is also the same with using 'See associated records' but again, this is not a particularly straightforward UX.

 

Am I barking down the wrong tree or can someone with better knowledge of these things give me any suggestions?

 

Thank you

 

Joe

4 REPLIES 4
Highlighted
Frequent Visitor

Re: Many-to-Many (N:N) Relationships Between Two Records of the Same Entity

Oh, and for context, here's a separate post I posted in relation to this.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Display-and-Edit-Many-to-Many-Relat...

Highlighted
Community Support
Community Support

Re: Many-to-Many (N:N) Relationships Between Two Records of the Same Entity

Hi @joew72 ,

 

Can you give some sample data and explain what you want to achieve with them?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Many-to-Many (N:N) Relationships Between Two Records of the Same Entity

Sure

 

So, I am building a basic case management system to hold data records for individuals we work with as an organisation.

 

Each individual has a case file which is stored under the entity 'Case'. I want to have something on the system which will allow the user to flag up where two or more individuals (i.e. cases) have some sort of real world connection (e.g. they are friends, they are siblings).

 

Using several lookup fields was one option but this was quite clunky as the real world connections can be numerous and this would result in numerous fields. I tried using a subgrid on a form and creating a N:N relationship between Case and Case. This solved the problem of having numerous connections however, when the user selects 'add existing case' on the subgrid, this only shows on one of the Case files, not both (which is what I would like to be able to do).

 

I am relatively new to using PowerApps and don't have much of tech background, so just trying to figure things out a bit the best I can.

 

Thanks for any help you can offer.

 

Joe

 

 

Highlighted
Frequent Visitor

Re: Many-to-Many (N:N) Relationships Between Two Records of the Same Entity

Sorry, I totally did not give you sample data there. Here's an example:

 

Case Records:

Harry Potter

Ginny Weasley

Ron Weasley

George Weasley

 

I would like to have it so that the user can flag up on the system that all 3 Weasley's have some sort of real world connection (i.e. they are all siblings). However, in some instances, the real world connection could be that they are friends, so on Harry Potter's file, it would also have a connection with all 3 Weasley's indicating that they are friends.

 

The plan was to then have a separate text area where the user can then describe what kind of relationship it is.

 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,511)