cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Trouble when importing date via Excel template

Hi: I have 2 entities in CDS, "Companies" & "Countries".

Companies has a look-up relation with Countries, so in Companies I have a field, CountryID, pointing to Countries entity.

The Countries entity is fully loaded and operational in CDS.

 

I prepared an Excel template with two rows only for the Companies entity which I filled with name and a CountryID value (which I took from an export of Countries entity).

 

When I try to import it to Companies entity I get an error, saying that there ís no recorcd in Countries entity matching what I put in CountryID.  

 

ROWNUMBER EXECUTIONID ERRORCOLUMN ERRORCODE ENTITYNAME DEFINITIONGROUP ERRORDESCRIPTION 1 ImportService_2018_05_22T20_30_14_207Z-2018-05-22T20:31:14-C438751F2D634A28B39DAC50BE97789 DMF1959 tblXpreXCompanies_ ImportService_2018_05_22T20_30_14_207Z The source file has duplicate values specified for unique field(s). 2 ImportService_2018_05_22T20_30_14_207Z-2018-05-22T20:31:14-C438751F2D634A28B39DAC50BE97789 DMF1959 tblXpreXCompanies_ ImportService_2018_05_22T20_30_14_207Z The source file has duplicate values specified for unique field(s).

  

I tried different ways of doing the import, getting always a similar error.

 

Any advice on how to fix it will be much appreciated. 

 

With my BRGRDS / JLB.

5 REPLIES 5
Highlighted
Frequent Visitor

Re: Trouble when importing date via Excel template

The subject of this post says "importing date", SHOULD be "importing data".

Thanks / JLB.

Highlighted
Power Apps
Power Apps

Re: Trouble when importing date via Excel template

Adding @sabinn from the Data Integration team

Thanks,
Clay.
Highlighted
Microsoft
Microsoft

Re: Trouble when importing date via Excel template

Whats the key you are using to ensure uniqueness? Is there a Primary and/or alternate keys defined for your tables? Have you defined any keys under "Keys" for Countries table?

sabinn
Highlighted
Frequent Visitor

Re: Trouble when importing date via Excel template

Hi Sabine: Thanks a lot for your quick response.

I used the PrimaryId in the child table, no other key has been defined.

Below printouts for entity Companies, fields and relations definitions plus a printout of entity Countries field definition.

Please let me know should you need any other information.

Thanks again / JLB. 

 

Table CompaniesTable CompaniesPrimaty Key for tbl CompaniesPrimaty Key for tbl CompaniesTable CountriesTable Countries

Highlighted
Frequent Visitor

Re: Trouble when importing date via Excel template

One more thing, Sabine: In table Countries, no more keys than the PrimaryId.

BRGRDS / JLB.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (10,084)