web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps mode driven ...
Power Apps
Answered

Powerapps mode driven app buisness process flow many to many relationship

(0) ShareShare
ReportReport
Posted on by

Hi,  i am having problem with  business process flow customization. I have a many to many relationship between two different tables. I am calling the tables as Physicians and Hospitals. I want to assign multiple selected physicians to hospital but the problem is i can only select one physician using lookup field (Please see attached image). How can i assign multiple physicians for the Hospital. I don't have that much experience with Powerapps so i would appreciate the briefed steps. Thanks & Regards

I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    Hi, did you create an M:M relationship in your solution? 

  • Community Power Platform Member Profile Picture
    on at

    Nope, i directly created M:M relationship on Hospital table.

  • Verified answer
    Edrei Profile Picture
    18 on at

    If you created a lookup field on the Hospital Table then you're no longer using the M:M relationship you created. A lookup field is essentially a 1:M relationship(the one side being the table referenced by your lookup in this case Physicians)

    To add multiple Physicians to a Hospital, add a subgrid to you Hospital form and select Physicians as the Table

    2021-07-07 15_31_50-Information Form and 4 more pages - Work - Microsoft​ Edge.png

     

    This will allow you to select multiple Physician when you select add Existing from the subgrid.

    2021-07-07 15_28_14-_new 2.png

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

     

    @Edrei did a great job identifying how to fix this...  

     

    I would like to suggest something if you may...  I usually avoid N:N relationships because it does not allow me to create attributes that define this relationship.  

     

    As an example with Physicians and Hospitals you might want to define attributes about this relationship (i.e. dates, role, primary nurse, etc.).

     

    I would normally create a table in-between these two tables and use 1:N relationships in-between.  You can then really do a lot more with these and define fields, other relationships from this table etc.   Structure would be something like:

    Hospital ---1:N---> Hospital Physician <---N:1---Physician

     

    Just thought I would mention this because most times i have ever gone down the N:N path I have switched to this.

     

    Hope this helps.  Please accept if answers your question and Like if helps in any way.


    Thanks,


    Drew

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Edrei , as i said i have very basic experience with powerapps but thanks for your answer you explained it very good. I am having one problem now, i have added the Subgrid and selected the physicians table but i am unable to see Add Existing Physicians or i am unable to see the right side panel in your second screen shot where you are selecting the multiple physicians. Can you please tell me how you are doing this? Please consider my newbie nature while answering my query.

  • Community Power Platform Member Profile Picture
    on at

    Ok, I resolved it by removing Lookup fields which were creating 1:N relationship. Can somebody tell me now why the Subgrid is not visible to me? i can see the Subgrid in form editor but not visible when i create new Hospital. 

  • Edrei Profile Picture
    18 on at

    @Anonymous you have to save the Hospital record first before the subgrid appears; the record doesn't exist yet until that initial save and so there's nothing to relate to, therefore no subgrid

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard