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 / Dataverse Lookup field...
Power Apps
Unanswered

Dataverse Lookup field: How does it work behind the scene?

(1) ShareShare
ReportReport
Posted on by 163
When setting up a lookup field in a Dataverse table to the another table, how does Dataverse know which fields are being joined between the two tables. How does the setting up of the Lookup column know which fields are the join going to be based on? 
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,351 Super User 2025 Season 2 on at
     
    It depends a little on the scenario
     
    1. Standard or Custom Tables
    2. Virtual Tables
    3. Many to Many relationships versus N1: or 1:N
     
    For 1:N / N:1
    For Standard or Custom (standard but not system) with 1:N N:1 , dataverse creates a reference between them, not.. per se linked to a specific field, as it can be the ID field, aka the unique identifier, or it can be a secondary key, so its not just limited to the GUID which is why I said its not
    .
    However, when you created your tables, when you create a relationship, it will have to show "something" in the column, so it will show the Primary Column that you assign, so pick that carefully so the data showing makes sense.
     
    This will cause the creating table to have a Column, that will display the Primary Column Data in it (from the other record).
     
    For Many to Many
    Dataverse creates another entire back end "mapping" table that you cannot access or add to. It does this because its a matrix now of references, not a single one. You have no control over this table and you don't see them in the UI as a single column like 1:N or N:1
     
    YOU can create your own Many to Many relationship by created your own table and then adding in rows where you associate records from A to records to B and vice versa
     
    The benefit to this is, you can also add other data points to each row, which you cannot do with the built in hidden many to many. Many of the older timers and I did this because we wanted to track information between the two table or in even a polymorphic relationship, versus just storing GUID1 and GUID2 (and event) GUID3/4/5/ etc
     
    It might be something like
     
    students to classes where classes have many students and students have many classes, but you also want to track IF a user attended or not and what date. Doing your own Many to Many allows that.
     
    For Virtual tables
    You can have 2 types
    1:N / N:1 and Custom multi-table (polymorphic) relationships
     
    Normally you would leverage the primary unique field in Dataverse (the GUID), and then have that as a foreign key in your Virtual Table.
     
    NOTE: You will hear Relationship and Many to one, but then see N:1 or 1:N and there is no wording of Many to one in the visual you pick :-)
     
    This is how they work in the back end.
     
    If this answers your Question please Mark as such and maybe a like :-)
     
    If you have any other questions after please let me know
     
     
     
  • Suggested answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    You are essentially creating a link to the ID of the other table if that is what you are asking. Each record has a unique ID. This is what is used. 
    It is not a SQL join if that is what you are asking. Also SQL joins are created when necessary as the tables are not linked and you are linking them when necessary using a related column. 
  • Suggested answer
    Fubar Profile Picture
    8,346 Super User 2025 Season 2 on at
    Each Table will have a column that is the primary key that is the same logical schema name as the Table but with an 'id' suffix e.g. the Contact table is contact with contactid (this field is automatically created by the system). Each time a record is created in the table the system will populate the primary key with a unique GUID.
     
    The Lookup field is a reference to another table. It is the 'many' side of a one-to-many relationship, and when you create the Lookup field on the child table the system will automatically create a relationship between the child and parent tables.
     
    The Lookup has a number of parts, and depending on what you are doing and how (e.g. create, update, read and via JavaScript or Plugin code) depends on what the important elements will be. Generally there is a id (GUID of the parent record), entityType (logical schema name of the parent table), name (display name shown to the user on a form, this is the value in the Primary Name column of the parent table).
     
     
     
     

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard