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

Community site session details

Session Id :
Power Apps - Power Query
Suggested answer

How to put Data from two diffrent Tables in existing Field?

(3) ShareShare
ReportReport
Posted on by
Hello Community,
 
I would like to ask about my problem.
 
I want to import Data in my model driven app with excel from two tables. Company and Contact. How to chande one field according the data from another field in existing table?
 
For Example:
 
Import Data: Table Account
ID ID Company
1 321
2 654
  
 
Import Data: Table Company
ID Company Name
321 Number 4 Company
654 Number 5 Company
 
My Existing Account Table has a Field with "Company name". So after importing i schoud get new informations.
 
ID ID Company Name
1 321 Number 4 Company
2 654 Number 5 Company
 
Am I right? I schould first Merge the Data and then with Business Rule update the data? There is Relationship with LookUp Field. But LookUpField is not in exist in Merging table. So i wanted to change the type of field in GUID. 
 
I would really appreciate for your Help! 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    47,123 Super User 2025 Season 2 on at
    How to put Data from two diffrent Tables in existing Field?
     
    So, when you say Import Data, I do not believe you mean importing for 2 different tables, you mean Merge 2 sets of data you have into a Single Table in Dataverse correct?
     
    Also, you have the ID as an integer, you do not need this, unless you need to keep track of the system, that is giving you the data so it maps to Dataverse. IF this is the case you should create a Secondary Key on the Account table, and the column, please don't try to call it ID, call it like SourceSystemID so you know its from the data master.
     
    Questions:
     
    1. How often do you need to do this?
    2. Is the data always in Excel format?
     
    Whether this is a one off or not, personally I would use a Power Automate Flow to import the data.
     
    If you were only doing this 1 time (although it would work many times)
     
    1. Create a Manual Flow
    2. Put the 2 files in SharePoint or OneDrive
    3. Use List Rows Present in a Table for Company
    --Add an Apply to each, with the Input/From being the output of step 3
    ---Add another List Rows Present in a Table for Account
    -----Add a Filter on ID eq items('Apply_to_Each')?['ID'] 
    -----NOTE the filter is using the column ID in the Account table to compare it to the ID of the Loop you are doing with Company so check spelling etc
    -----Add a Condition
    ------Set the left side to the expression length('InsertDynamicValue/BodyPropertyFromTheHighlightedInBlackItalixedData')
    ------is equal to
    ------1
    --------In the Yes side, it means you found a record in the Account Table that matched the Company
    ----------Inside the Yes, use an Add a Row, naming the Account Table in dataverse.
    ------------Map the Company Name, the ID Company Field and your secondary key (that you called ID)
     
     
    These steps will add all the records, keep the current ID, but also assign new GUIDs to each row as needed in Dataverse.
     
    If you write this up and have issues, happy to help, but if you go slow and just add them in the order I showed you, you should have no issues.
     
    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • Suggested answer
    Jon Unzueta Profile Picture
    1,215 Super User 2025 Season 2 on at
    How to put Data from two diffrent Tables in existing Field?
    Thanks for your question! You're on the right track, and I’ll walk you through how to import data into a model-driven app and update a field based on a related table using Dataverse relationships and Power Platform tools.

     Scenario Summary
    You have:
    • Account table with a field ID Company and a field Company Name (to be updated).
    • Company table with ID Company and Name.
    You want:
    • When importing data into Account, the Company Name field should be filled based on the matching ID Company from the Company table.

    🔄 Recommended Approach
    Step 1: Ensure Relationship Exists
    • In Dataverse, create a Lookup relationship from Account → Company using ID Company.
    • This allows you to reference fields from the related Company record.
    Step 2: Import Data
    • Use Excel import or Power Automate to import both tables.
    • Make sure the ID Company in Account matches the ID Company in Company.
    Step 3: Use Business Rule or Power Automate to Update Field
    You have two options:
    🔹 Option A: Business Rule
    • Create a Business Rule on the Account table:
      • Condition: ID Company is not empty.
      • Action: Set Company Name = Company.Name (from the lookup).
    • This works well for UI-based updates but may not trigger on bulk imports.
    🔹 Option B: Power Automate Flow
    • Trigger: When a record is created or updated in Account.
    • Actions:
      1. Get related Company record using ID Company.
      2. Update Account record with Company.Name.
    This is more reliable for bulk imports and background updates.

    🛠️ Alternative: Use a Calculated Field
    If the relationship is set up, you can create a calculated field in Account:
    • Formula: Company.Name
    • This automatically pulls the name from the related Company record.

    ⚠️ Common Pitfalls
    • Make sure ID Company is a Lookup, not just a text or GUID field.
    • If you're importing via Excel, ensure the Company records exist first.
    • If using GUIDs, you must match the actual Dataverse GUIDs, not just numbers.
    🏷️ Tag me if you have any further questions or if the issue persists. ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems. ❤️ Give it a Like if you found the approach useful in any way.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics