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 / Getting error while pa...
Power Apps
Unanswered

Getting error while patching the data to the sharepoint(Network error when using Patch Function: An error occured on the server)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Ashmitshrivasta_0-1650539975513.png

 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Please post your Patch() function.  You could check for yourself using @mdevaney 's suggestion of using the Errors() function in his example of a patch to a 'Test Scores' data source.  Substitute your own values in it. 

    Patch(
     'Test Scores',
     Defaults('Test Scores'),
     {
     TestName: txt_TestName.Text,
     StudentName: txt_StudentName.Text,
     Score: Value(txt_Score.Text)
     }
     );
     If(
     // check if there were any errors when the test score was submitted
     !IsEmpty(Errors('Test Scores')),
     // if true, show any error message
     Notify(
     Concat(Errors('Test Scores'), Column&": "&Message),
     NotificationType.Error
     ),
     // else, go to success screen
     Navigate('Success Screen');
     )

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    If(IsBlank(LookUp('Attrition Tracker Moody''s','Enterprise ID'=AttritionTextinput_1.Text)),
    Patch('Attrition Tracker Moody''s',Defaults('Attrition Tracker Moody''s'),
    {
    'First Name':DataCardValue2.Text,
    'Last Name':DataCardValue3.Text,
    Title:DataCardValue1.Text,
    'Enterprise ID':DataCardValue4.Text,
    Gender:{Value:DataCardValue5.Selected.Value},
    'Career Level':{Value:DataCardValue6.Selected.Value},
    'Sub Level':{Value:DataCardValue7.Selected.Value},
    Tower:{Value:DataCardValue8.Selected.Value},
    'Sub Process':{Value:DataCardValue9.Selected.Value},
    'Tower Lead Email':DataCardValue16.Text,
    'Supervisor Email ID':DataCardValue17.Text,
    'Resignation Date':DateValue7.SelectedDate,
    LWD:DateValue8.SelectedDate,
    'Managed / Unmanaged':{Value:DataCardValue33.Selected.Value},
    'Is this Critical resource?':{Value:DataCardValue30.Selected.Value},
    'Backfill Required':{Value:DataCardValue31.Selected.Value},
    'Attrition Reason':{Value:DataCardValue32.Selected.Value},
    'Reversal Date (If any)':DateValue9.SelectedDate,
    'Roll Off Date':DateValue10.SelectedDate,
    Comment:DataCardValue34.Text
    }),
    Patch('Attrition Tracker Moody''s',LookUp('Attrition Tracker Moody''s','Enterprise ID'=AttritionTextinput_1.Text),
    {
    'First Name':DataCardValue2.Text,
    'Last Name':DataCardValue3.Text,
    Title:DataCardValue1.Text,
    'Enterprise ID':DataCardValue4.Text,
    Gender:{Value:DataCardValue5.Selected.Value},
    'Career Level':{Value:DataCardValue6.Selected.Value},
    'Sub Level':{Value:DataCardValue7.Selected.Value},
    Tower:{Value:DataCardValue8.Selected.Value},
    'Sub Process':{Value:DataCardValue9.Selected.Value},
    'Tower Lead Email':DataCardValue16.Text,
    'Supervisor Email ID':DataCardValue17.Text,
    'Resignation Date':DateValue7.SelectedDate,
    LWD:DateValue8.SelectedDate,
    'Managed / Unmanaged':{Value:DataCardValue33.Selected.Value},
    'Is this Critical resource?':{Value:DataCardValue30.Selected.Value},
    'Backfill Required':{Value:DataCardValue31.Selected.Value},
    'Attrition Reason':{Value:DataCardValue32.Selected.Value},
    'Reversal Date (If any)':DateValue9.SelectedDate,
    'Roll Off Date':DateValue10.SelectedDate,
    Comment:DataCardValue34.Text
    }));
    ResetForm(Form1_3);
    ResetForm(Form1_4);
    Set(newitem1,"");
    If(IsBlank(newitem1),Notify("Details has been submitted successfully",NotificationType.Success),Notify("Details has been modified successfully",NotificationType.Success))

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, Please reply...it is urgent, same kind of patch function is working perfectly fine in other app.

    But it is giving error in this one

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 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard