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 / 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

Ashmitshrivasta_0-1650539975513.png

 

Categories:
I have the same question (0)
  • 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
    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
    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

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard