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 / Look up column from an...
Power Apps
Unanswered

Look up column from another table in Dataverse.

(0) ShareShare
ReportReport
Posted on by 85

Hi there!

 

I tried to study about the lookup column function in dataverse but I didn't really understand.

 

Here is my situation:

1. I have a table named "Stock In Latest", in this table I have a calculated column name "Quantity Stock In".

Az8PnG_0-1691507990326.png

 

2. I want to make the calculated column named "Quantity In" to be store in another table which is "E-Stock".

Az8PnG_1-1691508029079.png

 

I already create a relationship between this 2 tables. And in "E-Stock" table, I created a lookup column name "Quantity In" and the related table that I choose is "Stock In". 

 

Then, when I check in the "Quantity In" in E-Stock table, the value for the lookup column is the Part Number. It is should be the "Quantity Stock In" right?

Az8PnG_2-1691508130412.png

 

Can someone help me on this, already try to configure almost 3 days.

 

I have the same question (0)
  • MarioRing Profile Picture
    541 Super User 2024 Season 1 on at
    Hi, it's a little hard for me to understand your problem, can you describe it using only business requirements without any technical names? Could you also draw the desired data structure?
     
    Anyway, I have some insights, which may be helpful for you:
     
    1. If you create a Lookup field that points to another record, the system will always show you the main value of this record, which usually is its name. For example, in the Account table, we have a lookup field "Main Contact" which points to the record of type Contact. In the view of the Accounts, in column "Main Contact" we see the first and the last names of the selected main contact of the Account because the main field of the Contact is the column "Full Name".
     
    2. However, on the view we can add foreign columns of related records. For instance - I can add to my Account's view an additional column "Phone number" from the related Contact record. This value will be shown only if the lookup field "Main Contact" is filled with a Contact record that has its phone number.
     
    Please note, you must use the "View editor" feature to add the foreign column. It looks like it is not possible to do this on the table editor you showed on the screenshot. 
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Az8PnG To understand how this works, let’s use a basic Form in a Canvas App as an example. 

     

    Suppose we have a Table with a list of Issues, and another Table with a list of associated Actions. The Primary Name column in the Issues Table is "Record ID".

     

    In the Actions table, we create a Lookup column associated to the Record ID column in the Issues Table. We will call the Lookup column “Related Issue” (a one-to-many relationship).

     

    1. We create an auto generated three screen app based on the Dataverse Actions Table.

     

    Amik_0-1691524288094.png


    2. We add the Lookup field into the Edit Screen of the Form if it not there already. You will notice Power Apps will automatically create a Combo Box control for the Data Card Value.

    3. Note the Choices expression used in the Items property of the Data Card Value, it is using our relationship Lookup column ("Related Issue").

     

    Amik_1-1691524288096.png

     

    4. If you select Edit on the Combo Box properties pane on Fields, you will notice you can select any related field from the Issues table.

     

    Amik_2-1691524288097.png

     

    5. Suppose we want to include a Single Line Text column from the Issues table. Add a custom card and include a Label control inside it.

     

    Amik_3-1691524288467.png

     

    6. In the Text property of the Label control, enter ThisItem.'Your Lookup Column Name' followed by a period/full stop.

     

    Amik_4-1691524288097.png

     

     

    7. At the period sign, notice you can now select any column from the related Issues table

    8. Final result:

     

    Amik_5-1691524288098.png


    If you're using Model Driven Apps, you can achieve similar functionality using the Related tab or via Views such as the Quick View Form. 

     

    https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/types-forms 

     

    In summary then, so long as you have defined a relationship between your two tables (such as a one-to-many relationship), you will be able to return any associated column from that relationship in your App.

     

    I hope this helps.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at

    A Lookup field sits on the Child (many) record in a one-to-many relationship and is populated with the parent (one) record - the Lookup relationship is the 'linkage' between the records.  The Lookup field (or more specifically its relationship) is also what is called a Foreign Key.

     

    e.g. an Invoice has many Invoice Product items (and each Invoice Product can only be for one Invoice), this is a one-to-many relationship.  The Invoice Product record has a Lookup to the Invoice.

  • Az8PnG Profile Picture
    85 on at

    Hi @Fubar @Amik @MarioRing Thank u for replying me.

    My question is, is it the lookup field will only display the value of the primary column in the parent table?

     

    In my case:

    1. My parent table is "E-Stock".

    2. My child table is "Stock In Latest".

    3. I want to lookup the column from the "Stock In Latest" and store in my parent table which is "E-Stock".

    4. When I do the lookup, I see that the "E-Stock" lookup column displays the value of the primary column in "Stock In Latest" (as shown in picture above).

     

    So, is there any solution or formula that I need to change in order to make the lookup column display the value from other column?

  • Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at

    Lookup will is restricted to the Primary Name column, closest you would get is to edit the control properties and I believe you can set it to show 2 lines when the user is selecting.

     

    Also note, lookups only save the internal guid not the display name (e.g. if you change the name in the source, the next time your user looks at the lookup field it will show the updated name, the guid will remain the same), if you need to save additional values you will need to copy them from the record the lookup links to

  • MarioRing Profile Picture
    541 Super User 2024 Season 1 on at

    Are you thinking about the subgrids? This is a list of all records connected to the chosen one by lookups. For instance - There is a "City" table with a lookup field "Country" to choose the proper location. Of course, one City can be in one country only, but each Country may have any number of Cities. In that case, you can put a subgrid on the Country form, to see all the Cities which have this Country set in the lookup.

     

    Please note there is no 1:1 relationship in Dataverse. It is not recommended to use that kind of connection - in most cases, the best solution is to merge two records into one. However, you can create on Table A lookup to Table B, and on Table B lookup to Table A, but both relationships will be independent. That means you must manually assign both sides or make some automation that does this for you. It is risky because you may lose data integrity when A->B and B->C.

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Az8PnG the explanation I provided was in the context of interfacing with the table via a Canvas App or Model Driven App. If create an App (either Canvas or a Model Driven), you can get the columns you need.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard