cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JLBeltramone
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
JLBeltramone
Frequent Visitor

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

Thanks / JLB.

Adding @sabinn from the Data Integration team

Thanks,
Clay.

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

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

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

BRGRDS / JLB.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,758)