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 Apps / Bulk import of a looku...
Power Apps
Unanswered

Bulk import of a lookup column

(0) ShareShare
ReportReport
Posted on by 2

I am trying to bring in a number of tables into dataverse to then build model-driven apps off. Those tables (outside of dataverse) have relationships and common IDs across them, e.g.
Accounts table has an AccountID as the primary key but also have the AccountOwnerID which is linked to the UserID in the User table (many Accounts link to one AccountOwner)
Opportunities table has OppID as the primary key but also has the AccountID that those opportunities relate to (many Opps relate to one Account)
Contacts table has ContactID as the primary key but also has the AccountID they relate to (many contacts relate to one Account).

I'm still learning but it looks like I have to use a Lookup column format e.g. in the Accounts table to have AccountOwnerID lookup from the User table. Given I already have thousands of rows in the tables I'm bringing in, it doesn't appear to let me do a bulk import when using a lookup column for those foreign keys/lookup columns and recognise them as valid fields/rows. 

Appreciate any help. I'm new to dataverse but this is very easy to achieve in PowerBI & other data platforms so not sure why its not obvious in Dataverse. Thanks!

I have the same question (0)
  • gulshankhurana Profile Picture
    1,397 Moderator on at

    Hi

     

    Not sure how you're trying to import but I would import the data in the following order:

    1. User Table

    2. Account Table (so that it successfully looks up to the user record for Account Owner field)

    3. Contact Table (so that it successfully looks up to the Account record for the account lookup field)

    4. Opportunity Table (so that it successfully looks up to Accounts and Contacts fields)

     

    I hope this information helps.

     

    Kind regards

    Gulshan

  • Sunsetandwheel Profile Picture
    2 on at

    Thanks @gulshankhurana for the tips. Clarifying, will it automatically recognise those relationships or do I have to create it, and how do I pick the specific columns the relationship exists between in the two tables? Thanks for your help. 

  • Justine R Profile Picture
    6 on at

    Hello @Sunsetandwheel,

     

    In Dataverse, the Accounts, Contacts, and Opportunity records should have a column labelled ownerid where you have to put the owning user record ID.

    Contacts should have a parentcustomerid column where you have to put the contact's account's ID.

    Opportunities should have a parentaccountid column where you have to put the account's ID, and a parentcontactid column where you have to put the contact's ID.

     

    To my knowledge, you can't directly import data into the user table, you have to add those users through the Power Platform admin center in your app's environment. It may be simpler to do a first import without assigning the records, and then assigning them correctly in bulk once you're ready to go into production, because I think you may not be able to add users to the environment if they don't have a valid licence. Simply leave the ownerid column blank during import and it'll set the account you're using as the owner. If you want to auto-assign contacts and opportunities to the same owner as the account, you can configure the relationship behavior to cascade:all for record ownership in the account/contact and account/opportunity 1:N relationship.

     

    If using Excel templates to import, you can use the natural language identifiers (full name for users and contacts + account name for the account) in the lookup columns, as long as the records you're trying to link are already existing in the database; but if you have any duplicates between those natural language identifiers (e.g. 2 accounts with the same name), the system will return an error because it won't be able to determine which record you're trying to link.

     

    Hope this helps.

     

    Regards,

    Justine

  • pranavkhurana Profile Picture
    9 on at

    When you import data then the import wizard takes you through different prompts one of which is matching the data you want to import with a dataverse table and then mapping fields on your import file with the fields on that dataverse table. It is at the mapping step where you point towards the respective lookup column/field and it then creates the connections automatically. E.g. You first import the Accounts table data. Once the Account records are created after successful import, you then import the Contacts and the system will automatically associate account column info on your import sheet with the appropriate Account record in dataverse (provided there are no duplicate account names otherwise the system throws an errors as it wouldn't know which account name to associate the Contact with).

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 Apps

#1
11manish Profile Picture

11manish 556

#2
WarrenBelz Profile Picture

WarrenBelz 412 Most Valuable Professional

#3
Haque Profile Picture

Haque 296

Last 30 days Overall leaderboard