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 / Key in Dataverse table
Power Apps
Unanswered

Key in Dataverse table

(0) ShareShare
ReportReport
Posted on by

Hi

 

I am trying to pass data from Project online to Dataverse using Dataflows. My idea is to have dataflows fill the dables in Dataverse, but also refresh - update those tables when i want. In order to not have duplicate records, i thought to create primary keys in Dataverse tables. So here comes the first question - why i dont get the Unique Identifier column as an option when choosing the column to be a key? Second question, i am trying to choose id of a certain record to be a key, and getting this error over and over:

"dataverse Exception output: System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.xxx_ProjectOnlineProjectsBase' and the index name 'ndx_for_entitykey_xxx_xxxProjectsKey'. The duplicate key value is <redacted>."

I do not have any other key created (duplicate), neither similar name, though i dont even understand what do they mean with this.

I would appreciate if anyone can advise me here, first: am i doing right thing, is this the right way to not duplicate records in Dataverse tables?, and second, what is this error about and what should i  do?

 

Many thanks in advance!

I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @ladeedeee,

     

    The Id column of a table already is a primary key and unique. Using Alternate Keys is a way to enforce uniqueness on other columns or a combination of them, which is a composite primary key if you're familiar with SQL. This will prevent duplicates. Perhaps something like Project Name is a good candidate for a key if you know it's unique. 

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

     

     

  • todorovicdijana Profile Picture
    15 on at

    Hi @chrisg , thank you for your reply

    Yes, the id column is a primary column, but what i was trying to do is to create of it a Key (in Schema properties of the table). I did it in several other Datavarse tables, and in some of them i had this same errors appearing, while in others no. I always chose table specific id columns for creating a Keys, and in some tables they were part of composite keys, in some just one column key. As i tried to explain previously, when i select an option - create a Key, the Unique Identifier column - guid is not appearing as an option for selection among the olumns from the table, even though i found in documentation it is recommendable to use that one for the Key....

    If i dont create a Key in Dataverse table, but consider that Id column already is a primary key, each time when i refresh Dataflow that transfers data from Project Online to that Dataverse table, data duplicates in the table, and that is the point, i need to be able to use dataflows for updating the tables and not duplicating data.

    Does it make sense hat i am saying, i don´t know if i am clear enough? 🙂

     

  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @ladeedeee,

     

    I understand that alternate keys are required to ensure you can update records via Data Flows rather than creating new duplicate entries.

     

    If I understand correctly, you are also saying that your unique column from your Project Online source is a Unique Identifier (GUID)? If so, then when mapping that Project Online Guid to Dataverse, it has to be a separate column that is not the same as the Dataverse table Id column. You'll want to create a single line of text column to represent your Project Online Id. Then create an alternate key based off that.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

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 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard