cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Common Data Service Edit Form many to may

Hi,

 

Setup:

I created a new PowerApp with the following Entities in the Common Data Service:

 

  • Entity 1 - Players
  • Entity 2 – Tools
  • Entity 3 – Techniques

 

I then created a Lookup relationship with all Entities - for example "Players" have a relationship with “Tools” and “Techniques” and vice versa.

 

After I created the Entities and set the relationships I created an "Edit Form" in the application.

 

In the “Edit Form” I turned on the “Tools” and “Techniques” fields (once you click on the table and go to “Data” -> you can chose the fields you can edit)

 

Problem:

When I run the application and enter to the edit form, the Lookup filed allows me to choose only 1 value.

 

I would like to choose more than 1 value in each entity.

 

For example:

In the Entity called “Players” I have 3 entries:

  • Player 1
  • Player 2
  • Player 3

In Entity called “Tools” I have 3 entries as well:

  • Tool 1
  • Tool 2
  • Tool 3

I would like to be able to edit “Player 1” via “Edit Form” and select “Tool 1” and “Tool 2”.

 

I read the following article: https://powerusers.microsoft.com/t5/PowerApps-Ideas/Multiple-value-lookup-Sharepoint/idi-p/31408

 

But I don’t have that option.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CWesener
PowerApps Staff

Re: Common Data Service Edit Form many to may

 

Hi @Anonymous,

 

While we dont currently allow you to create a many to many relationship directly in the portal, you can still do this manually by creating a bridging entity between the two entities. You would create a new custom entity with two lookup fields, one to each of your entities allowing you to create many to many relationships. From your app, you would need to write a manual patch to create this bridging record.

 

As an example, you can see the "Account Contact" entity in the Common Data Service, it exists to create a many to many relationship between Account and Contact.

 

Thanks,

Thanks,
Clay.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Common Data Service Edit Form many to may

Hi @Anonymous,

 

Many to many relationship is not supported in PowerApps Common Data Service currently release.

"

Define a relationship

You can create several types of relationships from one entity to another (or between an entity and itself). Each entity can have a relationship with more than one entity, and each entity can have more than one relationship to another entity. Some common relationship types are:

  • Normal - This type of relationship exists between two entities.
  • Self - This type of relationship exists between an entity and itself.
  • One-to-one - In this type of relationship, each record in entity A can match only one record in entity B, and vice versa. The current release of the Common Data Service does not support this type of relationship for custom entities.
  • One-to-many - In this type of relationship, each record in entity A can match more than one record in entity B, but each record in entity B can match only one record in entity A.
  • Many-to-many - In this type of relationship, each record in entity A can match more than one record in entity B, and vice versa. The current release of the Common Data Service doesn't support this type of relationship.

"

Reference

 

SharePoint list supports Multiple Lookup field, please consider switch to SharePoint as the data source.

 

If you would prefer to have Common Data Service support the Many to many relationship, then please consider submit it as an idea:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerApps Staff CWesener
PowerApps Staff

Re: Common Data Service Edit Form many to may

 

Hi @Anonymous,

 

While we dont currently allow you to create a many to many relationship directly in the portal, you can still do this manually by creating a bridging entity between the two entities. You would create a new custom entity with two lookup fields, one to each of your entities allowing you to create many to many relationships. From your app, you would need to write a manual patch to create this bridging record.

 

As an example, you can see the "Account Contact" entity in the Common Data Service, it exists to create a many to many relationship between Account and Contact.

 

Thanks,

Thanks,
Clay.

View solution in original post

Highlighted
PedroRTM
Level: Powered On

Re: Common Data Service Edit Form many to may

Hi @CWesener. While this is true, last time I tried I couldn't delegate a lookup to the server, which makes this solution unrealastic for a database with over 500 records unless I'm missing something.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,799)