cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JLBeltramone
Level: Powered On

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
Level: Powered On

Re: Trouble when importing date via Excel template

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

Thanks / JLB.

PowerApps Staff CWesener
PowerApps Staff

Re: Trouble when importing date via Excel template

Adding @sabinn from the Data Integration team

Thanks,
Clay.
Moderator
Moderator

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
JLBeltramone
Level: Powered On

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. 

 

image.pngTable Companiesimage.pngPrimaty Key for tbl Companiesimage.pngTable Countries

JLBeltramone
Level: Powered On

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Users Online
Currently online: 93 members 3,821 guests
Please welcome our newest community members: