Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Error Handling
Unanswered

Error on Patch trying to use unique key that already exists in table

(0) ShareShare
ReportReport
Posted on by 4
We have a Dataverse table with a primary key, so other tables can use the key as a lookup.  The key is a text format Autonumber column called "ID".
 
In our canvas app, we have a Patch function inside a ForAll that should create new rows in our Dataverse table.  We use Defaults(TableName) to create the new rows.  We do not specify what to patch to the primary key column, so that the Autonumber column can create a unique number.
 
As of last week we have started having a strange issue where we will get network errors ("There are conflicts with changes on the server") intermittently when trying to patch.  The patch function will create some of the new rows but not all.
 
After using the Monitor I have found that the Patch is trying to create a row with an ID that already exists in the table.
 
We have only seen this happen in our Test/Prod environments, and not our Dev environment.
 
Can anyone suggest how we fix this?
 
Error message from the monitor is below (it is in Danish due to my org's language restrictions)
 
 "data": {
    "errors": [
      {
        "Kind": 6,
        "Message": "Netværksfejl under brug af Patch-funktion: Der er konflikter med ændringer på serveren. Du bedes genindlæse.",
        "Source": "Button_Gem_3.OnSelect",
        "Observed": "Button_Gem_3.OnSelect",
        "Details": {
          "HttpStatusCode": 412,
          "HttpResponse": {
            "code": "0x80060892",
            "message": "Der findes allerede en post, der har attributværdierne Tilsyns_ID. Objektnøglen Tilsyns_ID kræver, at dette sæt attributter indeholder entydige værdier Vælg entydige værdier, og prøv igen.",
 
 

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Error Handling

#1
stampcoin Profile Picture

stampcoin 64

#2
DS-11051211-0 Profile Picture

DS-11051211-0 20

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 9

Overall leaderboard

Featured topics