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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Relationship between t...
Power Pages
Unanswered

Relationship between two CDS entities

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

I have a question about the relationships between entities in CDS. I have 2 existing entities which I want to connect through a relationship.

  • Entity1(Population): has 10000 records 
  • Entity2(Contact): has 5 records 

new.PNG

In Entity2 I created a many-to-one relationship(not sure which one to create as both entities has single entry for particular user). With this relationship a new "lookup" field gets added automatically to Entity2 which is called Entity1ID. At this time this field/column has no values in it. I want to populate the EntityID column (LookUp column) in your Entity2 with values (Primary Name) from your Entity1 based on the particular contact within CDS.

How can I achieve that?

Referred this link already but not able to what I want. 

Any help is appreciated !

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want to establish a mapping between records between two interrelated entities?

    Firstly,let me explain why you can not patch the Primary Name to Entity1ID.

    Because the lookup column only stores the ID of the corresponding record in the associated entity.

    Secondly, there are many ways to establish a mapping between records between two interrelated entities:

    I will introduce you to the two most common methods:

    Method1:Using Relate function.(Canvas App)

    I think this link will help you a lot:

    Relate and Unrelate functions in Power Apps

    Method2:Using Edit record function.(Model-Driven App)

    Step1:Data-Entities-your main entity-data-Edit record

    1.jpg

    Step2:Related-related entity

    2.jpg

    Step3:Add New XX or Add Existing XX

    *Contact is my related entity

    3.jpg

    Best Regards,

    Bof

    3.png
    1.jpg
    2.JPG
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the response!

    First of all, what is mean by interrelated entities?

    Is there any method for PowerApps portal?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Does the PowerApps portal you mentioned refer to the portal app?

    First,interrelated entities means entities that have established relationship.

    Secondly,If you need to add an associated record in the portal app, maybe you should modify the entity's from.

    1.jpg

    Best Regards,

    Bof

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
Valantis Profile Picture

Valantis 46

#2
11manish Profile Picture

11manish 46

Last 30 days Overall leaderboard