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 / Network error when usi...
Power Apps
Answered

Network error when using Patch function: An unknown error occurred.

(0) ShareShare
ReportReport
Posted on by 12

Hey,

 

I am relatively new to PowerApps and am not sure of all the features that are available, so bear with me. I recently created a custom form attached to a SP list meant to allow users to patch/update the list with new records. However, when attempting to run tests and upload new records I experience the following error code: 

 

Network error when using Patch function: An unknown error occurred.

 

I was wondering if I could receive guidance or next steps to resolve this issue, any and everything would be appreciated!

 

Patch function:

ali00418_0-1684343149246.png

 

Let me know if any further information is needed

 

Categories:
I have the same question (0)
  • VDI Profile Picture
    337 on at

    in patch use DataCardValue2.Text, DataCardValue3.SelectedDate, //I think it's datepicker

    txtPer.Text

  • ali00418 Profile Picture
    12 on at

    Since User is a Person or Group column, is it necessary to include .Text to the end of DataCardValue2?

     

    Here are all my column settings so far if that will help:

    ali00418_0-1684344753172.png

    ali00418_1-1684344814033.pngali00418_2-1684344840962.png

    As well as the format of the application:

    ali00418_3-1684344950816.png

     

     

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @ali00418 ,
    To patch people picker, use below syntax (you will have to replace list name and check column names as there ight be some typing mistake) - 

    Patch(ListName, Defaults(ListName), {User: {
    DisplayName: DataCardValue2.DisplayName, Claims:"i:0#.f|membership|" & DataCardValue2.Email, Department:"",JobTitle:"",Picture:"",Email:DataCardValue2.Email
    }, DateLogged: DataCardValue3.SelectedDate, percentageofTimeWorked: txtPer.Text})

     

     

  • ali00418 Profile Picture
    12 on at

    I'm currently using the following formula in the onvisible property of the form screen to extract the current user's information, and placing that as the default of datacardvalue2:

    Ex:

    ali00418_0-1684346946021.png

    Ex 2:

    ali00418_1-1684347019415.png

     

    Due to this would it be best to make your suggested change, and scrap the current user variable? Or is it still possible to implement it?

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @ali00418 ,
    Try using below formula (Patch function) in OnSelect property of button - 

    Patch(ListName, Defaults(ListName), {User: {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|"&User().Email,
    DisplayName: Office365Users.UserProfile(User().Email).DisplayName,
    Email:User().Email
    ,JobTitle:"",Picture:""
    }, DateLogged: DataCardValue3.SelectedDate, PercentageofTimeWorked: txtPer.Text})
  • ali00418 Profile Picture
    12 on at

    Hey @NandiniBhagya20 ,

     

    When I attempt to use your suggested fix, I get the following error in my patch function:

    ali00418_0-1684773002541.png

    I was wondering if you could shine some light on this issue, as it seems to be the final thing holding the form back from working as intended.

     

    Thanks 🙂

  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @ali00418 ,
    Try using below updated formula - 

    Patch(ListName, Defaults(ListName), {User: [{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|"&User().Email,
    DisplayName: Office365Users.UserProfile(User().Email).DisplayName,
    Email:User().Email
    ,JobTitle:"",Picture:"",Department:""
    }], DateLogged: DataCardValue3.SelectedDate, PercentageofTimeWorked: txtPer.Text})

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 739 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 268

Last 30 days Overall leaderboard