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 / The item has already b...
Power Apps
Answered

The item has already been created on the server

(0) ShareShare
ReportReport
Posted on by 270

Hi,

 

I have an app connecting to Sharepoint lists and I am gettign the error "The item has already been created on the server......." - see attached screenshot.

 

I do not get this when I run PA from the web page - only when I run it from my sharepoint - I have it embedded in an iFrame.

 

It is a random error - I only get it when I go into the main screen of my app which is loading a lot of Shaepoint data from a list, but not all the time - sometimes it is fine. I have a decent connection to the internet - approx 70mbs download but only 2mbs upload - not sure if that matters.

 

I am not saving a thing at this point - simply loading the forms - multiple forms based off the same list - yes I can have 2 forms being loaded with the same data from the same field.  Still not saving anything as far as I am aware.

 

Is there a way to troubleshoot this to find out what might be causing the conflict?  

 

Anyone seen this before?

2018-05-25_16h55_21.png
Categories:
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Gargoolgala,

     

    Do you have any other web parts in this page? I have never seen this error in my site. Please check if this is related to the other parts of your custom site.

     

    Regards,

    Mona

  • Gargoolgala Profile Picture
    270 on at

    Mona,

    if you mean web parts in my sharepoint site then no - I have no other web parts - it is the only one.

     

    Is ther a way to debug - PA needs to help us help ourselves

  • bdodu Profile Picture
    399 on at
    Are you updating the list with Patch ? May be on the OnChange event of one control?
  • bdodu Profile Picture
    399 on at
  • Gargoolgala Profile Picture
    270 on at

    I have many OnChange events in the form but I would hope that when simply opening a form it does not consider that to be a OnChange event.

  • Gargoolgala Profile Picture
    270 on at

    What seesm to be happening is the OnChange event is causing this issue.  I have the following in my onChange:

     

    If("Windows" in dcvServerOS.SelectedItems.Value,false,Patch('Secure Print Assessments',First(Filter('Secure Print Assessments', ID=SelectedCustomer.ID)),{ServerOS:dcvServerOS.SelectedItems,WindowsServerOS:lbEmptyMulti.SelectedItems.Value}));If("Windows" in dcvServerOS.SelectedItems.Value,false,Reset(dcvWindowsServerOS));If("Other" in dcvServerOS.SelectedItems.Value,false,Patch('Secure Print Assessments',First(Filter('Secure Print Assessments',ID=SelectedCustomer.ID)),{OtherServerOS:txtEmpty.Text}))

     

    My goal here is that when I seelct certain values in a combobox I will either reset another field pending what my choice is - basically if I remove Windows as an entry then I want anohter field set to empty by patching it to a null value of an empty combobox.  I then reset the combobox which has been patched to null in my SP List.  I also have a similar rule based on Other.

     

    If  I remove the onChange event I do not get the error.   What seems to be happening is the onChange event kicks in when I open a form for that record - I only want it to trigger when I actually change a value - not when I load the form.

     

    Any ideas on how to avoid the OnChange event when the form loads a new record?  Or a better way to reset the combobox to a null value?

  • Verified answer
    bdodu Profile Picture
    399 on at

    in your case OnChange executes multiple times and therefore you need to keep a hidden original value.

    Before your patch check the old value to see if you really need to execute a patch. This way the onchange will not execute and you will get rid of the ugly error.

     

    Write an IF in front,  something like if( <changed?>, <your_original_if>, false), where <changed> is the comparison with the hidden value.

  • Verified answer
    Gargoolgala Profile Picture
    270 on at

    Bdodu,

     

    yes - this is exactly what I was intending on doing(glad you are thinking the same way) - although I have also logged a support call as I do not think OnChange should be triggering just because of a new record.

     

    I was hoping to avoid working around what seems to be a bad design - in my head at least 🙂

     

    Do you know if OnChange is intended to trigger even if I am simply switching records?  BTW - If I open record 1 - get the error - then go back to home page - open record 1 again it gives no error - I assume as it is still on the same record and nothing has changed.

     

    Thanks for the help -  I will let you know if it works.

  • Gargoolgala Profile Picture
    270 on at

    I added a variable to check the onchange event and this method worked but it was not ideal.

     

    After logging a support call with MS they did confirm that when a record changes it is considered a OnChange event.

     

    In the end I removed my OnChange events completely and used a different method based on the data card being visible or not and setting the Update value based on the visibility e.g. If(datacardvalue.Visible=true, datacardvalue.Text,txtEmpty.Text) where txtEmpty.Text is a generic value I can work with e.g. N/A

  • PowerBIDine Profile Picture
    8 on at

    Hi,

     

    Anyone Did resolve this issue, 

    I have added same kind of records many times, but after 2 days i am facing same issue, when click "SUBMIT " Button.

     

    ERROR -  Network Error When patch Function :- this item has already created on server

     

    {
      "status": null,
      "duration": null,
      "dataSource": null,
      "responseSize": null,
      "controlName": "Button1",
      "propertyName": "OnSelect",
      "nodeId": 2,
      "formulaData": {
        "script": "SubmitForm(Form)",
        "spanStart": 0,
        "spanEnd": 16
      },
      "data": {
        "errorMessage": "Network error when using Patch function: The item has already been created on the server.",
        "raiseToastNotification": false,
        "wasReported": false,
        "functionName": "Patch",
        "context": {
          "entityName": "Button1",
          "propertyName": "OnSelect",
          "id": 2487,
          "nodeId": 2,
          "diagnosticContext": {
            "formula": "SubmitForm(Form)",
            "span": {
              "start": 0,
              "end": 16
            }
          }
        },
        "info": "Network error when using Patch function: The item has already been created on the server."
      }
    }
     
    Could someone help regarding this????

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard