web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The item has already b...
Power Apps
Unanswered

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?

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard