Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Error when trying to patch to sharepoint

(0) ShareShare
ReportReport
Posted on by 11
I am trying to patch more than one column. I have Title and a Person column working (labeled UserInfo), but when I add anything else it stops working. I tried adding another column and it gives me the network patch erro,:the request operation is invalid.
 
I've refreshed the data. I've removed and added the data connection. I've tried different columns. I don't know what the issue is. Any ideas?
 
Any help is appreciated!
  • Verified answer
    WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Re: Error when trying to patch to sharepoint

    @AdamG87 ,

    Please have a read of this blog of mine as you will need to understand this if you are going to do any sort of references to control values. Can you please confirm if the dropdown is multi-select and also its Items property and the field name it is displaying.

  • AdamG87 Profile Picture
    11 on at
    Re: Error when trying to patch to sharepoint

    Ok so I got it to work by adding all the Fac and Ca columns (14 total) plus the title. It works. Now when I add another column, it breaks. I tried adding Fac (Dropdown connected to a list another coworker built that's been filtered) to Facilitator (SharePoint column, multi-text):

    Patch(
    'After Class Survey',
    Defaults('After Class Survey'),
    {
    Title: User().FullName,
    Facilitator:Fac,
    Fac1: FONE.Selected.Value,
    Fac2: FTWO.Selected.Value,
    Fac3: FTHREE.Selected.Value,
    Fac4: FFOUR.Selected.Value,
    Fac5: FFIVE.Selected.Value,
    Fac6: FSIX.Selected.Value,
    Fac7: FSEVEN.Selected.Value,
    Ca1: CONE.Selected.Value,
    Ca2: CTWO.Selected.Value,
    Ca3: CTHREE.Selected.Value,
    Ca4: CFOUR.Selected.Value,
    Ca5: CFIVE.Selected.Value,
    Ca6: CSIX.Selected.Value,
    Ca7: CSEVEN.Selected.Value
    }
    )

  • WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Re: Error when trying to patch to sharepoint

    @AdamG87 ,

    It simply indicates there is an error in the patch - I now recommend some basic debugging and work on this assuming FONE is the actual name of the Radio Control and Fac1 is a Text field.

    Patch(
     'After Class Survey',
     Defaults('After Class Survey'),
     {
     Title: User().FullName,
     Fac1: FONE.Selected.Value
     }
    )

    Once you get Fac1 working, you can start adding items to ensure they all work.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

     

  • AdamG87 Profile Picture
    11 on at
    Re: Error when trying to patch to sharepoint

    I did try that. It didn't help. I did run a monitor and attached the pic. I'm not sure what to make of it

  • WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Re: Error when trying to patch to sharepoint

    @AdamG87 ,

    If FONE is a Radio Control, you need

    FONE.Selected.Value

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

  • AdamG87 Profile Picture
    11 on at
    Re: Error when trying to patch to sharepoint

     Fac1 is column, and FONE(thru Seven) are the names of the radio boxes that should write to the column. All columns Fac1-Ca7 are multi text. I can get it to work without all Fac-Ca7, but not with it.

    Here is the code currently (I also updated the pictures in my original post):

     

    Patch('After Class Survey',Defaults('After Class Survey'),{Title:User().FullName,UserInfo:
    { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & Office365Users.MyProfileV2().mail,
    Department: "",
    DisplayName: Office365Users.MyProfileV2().displayName,
    Email: Office365Users.MyProfileV2().mail,
    JobTitle: "",
    Picture: ""},
    Fac1:FONE,
    Fac2:FTWO,
    Fac3:FTHREE,
    Fac5:FFIVE,
    Fac6:FSIX,
    Fac7:FSEVEN,
    Ca1:CONE,
    Ca2:CTWO,
    Ca3:CTHREE,
    Ca4:CFOUR,
    Ca5:CFIVE,
    Ca6:CSIX,
    Ca7:CSEVEN
    })

  • WarrenBelz Profile Picture
    146,618 Most Valuable Professional on at
    Re: Error when trying to patch to sharepoint

    Hi @AdamG87 ,

    Firstly, can you please post your code as Text also - the below is OCR'd so watch spelling. 

    Patch(
     'After Class Survey',
     Defaults('After Class Survey'),
     {
     Title: User().FullName,
     UserInfo:
     { 
     '@odata.type': "«Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Lower(User().Email), 
     Department: DisplayName: User().FullName,
     Email: User().EMail, 
     JobTitle: "",
     Picture: ""
     },
     Fac1: FONE
     }
    )

     Apart from a couple of suggestions on the User's details (which I do not believe are your issue), what is FONE ?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard