Skip to main content

Notifications

Community site session details
Power Apps - Microsoft Dataverse
Answered

Network Error when using Patch function: The requested operation is invalid

Like (0) ShareShare
ReportReport
Posted on 16 Nov 2021 22:57:27 by 9

I'm getting an error when patching a SharePoint list from a PowerApp with little to no information to work off of. The only message is "Network Error when using Patch function: The requested operation is invalid". I dug into the Error object and found a code of 8, which I believe corresponds to ErrorKind.ConstraintViolation (One or more constraints have been violated).

 

I have narrowed down the error to a multiple-select Person or Group column in my SharePoint list called "Operators". When I comment that column out, the Patch is successful. When it's included, I get the error above. The worst part is, I have successfully patched to a Person or Group column in a different SharePoint list, but this one fails.

 

Column settings:

shoeheart_0-1637102851350.png

 

My code that is failing:

 

Patch(
 'SharePoint List Name',
 Defaults('SharePoint List Name'),
 {
 Title: "Title",
 Zone: {Value: sel_sh_zone_name},
 Shift: {Value: sel_shift_name},
 Line: {Value: sel_line_name},
 Date: DateValue(DateDisplay_Component_12.datasource),
 Operators: AddColumns(
 operators_select.SelectedItems,
 "Claims",
 "i:0#.f|membership|" & Mail,
 "Email",
 Mail,
 "Picture",
 "https://<base_site_url>/_layouts/15/UserPhoto.aspx?Size=L&AccountName=" & Mail
 )
 }
 )

 

 

The operators_select.SelectedItems is a Office365Users table. I need to add the "Claims", "Email", and "Picture" columns in order to avoid Table schema errors. Before attempting the Patch, no errors/warnings show up. Like I said, this strategy has worked successfully in another SharePoint list with this column type. I've scoured settings and haven't found any differences yet.

 

If anyone has any ideas for what to look at next or how to get more detail on the error message, please let me know! Thanks.

 

Categories:
  • MdmasumBillah Profile Picture
    2 on 31 May 2024 at 15:05:09
    Re: Network Error when using Patch function: The requested operation is invalid

    I am getting same message but my data source is MS SQL 

    MdmasumBillah_0-1717167691721.jpeg

    My formula is 

    MdmasumBillah_1-1717167720103.jpeg

    @shoeheart @LaylaMarhoum @ggulbata @RobertLim @KellyKash 

  • LaylaMarhoum Profile Picture
    11 on 16 May 2024 at 13:38:34
    Re: Network Error when using Patch function: The requested operation is invalid

    I have the same problem; I deleted all the blank cells and rows from my list, but I still receive the error message: Network error when using patch function: the requested operation is invalid.

  • ggulbata Profile Picture
    2 on 18 Apr 2024 at 08:24:07
    Re: Network Error when using Patch function: The requested operation is invalid

    I was experiencing the same problem. After lots of trial and error i discovered that problem was that I was validating the data from SP list settings -> Validation settings, After removing the validation from list and keeping validation only in the app patch worked.

  • RobertLim Profile Picture
    12 on 14 Dec 2023 at 00:27:35
    Re: Network Error when using Patch function: The requested operation is invalid

    What are possible reasons of "Network Error when using Patch function: The requested operation is invalid"?

  • KellyKash Profile Picture
    2 on 14 Sep 2023 at 21:45:15
    Re: Network Error when using Patch function: The requested operation is invalid

    Hello, I am having the same issue. 

     

    I’m trying to use a Patch() function to collect some data (product name, price and quantity) from my shopping cart gallery and then populate a product order table in Dataverse. 

     

    Patch function:

    ForAll(ShoppingCartGallery_1.AllItems,Patch('Product Orders',Defaults('Product Orders'),{'Product Name':ThisRecord.Item.ProductName, 'List Price':Value(ThisRecord.Price),Quantity:Value(ThisRecord.QuantityTextInput_1.Text)}))

  • Rosheen Profile Picture
    2 on 16 Jul 2023 at 00:01:56
    Re: Network Error when using Patch function: The requested operation is invalid

    This error occurred when I'm trying to make a checkout.

    Rosheen_0-1689465654182.png

     

    I also want to know how to create relation between tables. Please help me in these issues

  • Zarayuvi Profile Picture
    4 on 14 Feb 2023 at 08:27:14
    Re: Network Error when using Patch function: The requested operation is invalid

    If you are using Submit Form(Sharepoint1) and getting the error :Network Patch using title column

    Then make sure you go to List Setting->Advanced settings->Allow Management of Content Types ->Yes (by default it will be No)

    Go back to settings->Column title -> Remove the required information to No

    Once done with changes go to Powerapps and refresh the Sharepoint source

  • Community Power Platform Member Profile Picture
    on 29 Dec 2022 at 15:15:51
    Re: Network Error when using Patch function: The requested operation is invalid

    I need help, I am getting the same Network error on the Patch function

  • natalia10 Profile Picture
    44 on 28 Nov 2022 at 01:14:14
    Re: Network Error when using Patch function: The requested operation is invalid

    Halo, 

     

    i am having this error , but a bit different.

    anyone can help me please. 

    so i click my check all button then i transfer my data , my transfer button contain Patch in it. Previously is working so im not sure why suddenly is not working.

     

    Many thanks

  • Community Power Platform Member Profile Picture
    on 28 Jul 2022 at 10:36:14
    Re: Network Error when using Patch function: The requested operation is invalid

    @v-xiaochen-msft sorry this is random, but I am facing a similar issue. I am new to powerapps and would appreciate if you could explain about -"'Mail' column of each record has a value rather than blank." I did not quite understand. Thanks.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard

Featured topics