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 / Dataverse for Teams: U...
Power Apps
Answered

Dataverse for Teams: Update existing rows by a Primary Key (UID) and add new data

(0) ShareShare
ReportReport
Posted on by 86

Hello Community,

 

i have a dataflow thatis checking a datasource for new data in comparsion with a dataverse table.

The dataverse table has the UID "tablenameID" and a primary key "error_id".

 

While loading the flow into the dataverse, i would like to

- update the existing data in the table (i.e. error_status = fixed)

- create new data in the table (i.e. error_status = open)


I can choose a primary key in the loading screen and select the existing UID "tablenameID" as a primary key.
All existing data has a primary key, the update works fine.


The problem is the new data, which has a primary key value of "null" and therefore the flow crashes with the error:

{"message":"Invalid type for entity id value","cdsErrorCode":"0x80040203","HelpLink":"http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040203&client=platform","InnerErrorMessage":"Invalid type for entity id value","

 

I can not load the results in two queries (update existing data, add new data) because both of them would address the same table.

 

Is there a trick how to get the job done that im overlooking ?

Greetings,

Seb

 

I have the same question (0)
  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @Sebastian030, can you auto generate a value for the new data in the primary column! In Power Query, if it is null. How do you generate the PK value in the Dataverse table?

     


    If my reply helped you, please give a 👍 If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it more.

    Visit my Blog: www.powerplatformplace.com

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

  • Sebastian030 Profile Picture
    86 on at

    Hello @AhmedSalih ,

     

    thank you for your reply.

    The PK Value is the Row UID generated by the Dataverse itself when a new line is added.

  • Verified answer
    Sebastian030 Profile Picture
    86 on at

    Hello @AhmedSalih ,

     

    i found a solution.

    The Keyword ist "alternate Keys", the Microsoft Documentation has more Information at

    Define alternate keys using Power Apps - Power Apps | Microsoft Learn

     

    I am using an Dataverse for Teams environment and couldnt find the options to set alternate keys.
    I then found another Post in the Community 

    Solved: Define alternate key for Dataverse for team? - Power Platform Community (microsoft.com) with an answer from @Sattar on 13. of June 2022.

     

    If i change the URL /tables to /keys i can set an alternate key in a dataverse for Teams Environment and use the alternate key as inteded.


    Problem solved, kudos to @Sattar 

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard