cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
klaudia
New Member

Many to many relationship in model driven app with data from external source

Hi,

 

I have a model driven app and I am using dataflows to update entities in CDS with the data form SQL DB. It works well for one-to-many relationships (I use lookup fields), but I do not know how to handle many-to-many relationships.

 

For example, I have two entities, Application and Server, which should have a many-to-many relationship. In SQL, there is a separate table, application_server, which shows the relationships between records from application table and server table:

SQL setup.png

How can I recreate my SQL setup in model driven app? I know I can create many-to-many relationship in Power App, but I cannot imagine how can I provide the data about which entry of Application table has a partner in Server table (application_server table in SQL). Can I also use dataflow for that?

 

At the end I would like to be able to show:

  • the list of servers hosting chosen application
  • the list of applications hosted on chosen server

 

Best regards,

Klaudia

1 ACCEPTED SOLUTION

Accepted Solutions
Hapa1
Frequent Visitor

Provisioning data for a many to many relationship through just a dataflow is not supported (Source). However, you can use the "Relate Records" action in Power Automate immediately after loading your Application and Server records into CDS to establish a relation between your records. I'll demonstrate this in the screenshot below.

 

I would also recommend looking at this Post or this Blog Post for help.

 

Drawing.png

View solution in original post

3 REPLIES 3
jonashau
New Member

Following. Facing the some problem!

Hapa1
Frequent Visitor

Provisioning data for a many to many relationship through just a dataflow is not supported (Source). However, you can use the "Relate Records" action in Power Automate immediately after loading your Application and Server records into CDS to establish a relation between your records. I'll demonstrate this in the screenshot below.

 

I would also recommend looking at this Post or this Blog Post for help.

 

Drawing.png

It works! Thank you very much for your help 🙂

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,308)