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

Network error when using patch function: the requested operation is invalid

(0) ShareShare
ReportReport
Posted on by 70

This is the code I am using, I'm not sure what the issue is. 

pathc.PNG

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @Cseni ,

     

    In your formula, instead of referencing controls, you need to reference the property in the control that has its' value.

     

    For Text input controls that's the Text property, so for the Employee column, you need:

     

    Text: UserName.Text

     

     

    Below you can see the properties you need for all types of controls:

    Control type Value Property
    Text Input Text
    Drop Down Selected
    Check Box Value
    Date Input SelectedDate

     

    For columns that are of type Number, you'll need to convert any text to a number using the Value function, for instance:

     

    'Mileage Total' : Value(TextBox_MileageTotal.Text),

     

     

  • Cseni Profile Picture
    70 on at

    Hi, thank you that makes sense, however I am using modern controls, will this make a difference?

  • Cseni Profile Picture
    70 on at

    This is what comes up. If i remove "approved by" then another gets selected with the same error 

     

    patch.PNG

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @Cseni ,

     

    Assuming the 'Approved by' column is a text type and Dropdown_Approvedby is a people picker, you need to select one or the properties of the record, for instance Email:

     

    'Approved by': Dropdown_Approvedby.Selected.Email,
  • Cseni Profile Picture
    70 on at

    Hi, thank you for your help, however, I think I may have done something wrong or I'm just not understanding. This is my SharePoint list and now I'm worried I have set it out all wrong. 

    Cseni_1-1705481992940.png

     

    And then this is my app 

    Cseni_2-1705482117695.png

    I hope this can make it a bit clearer, as I am really stuck at this moment, and would really appreciate some guidance.  

    Thank you for your help. 🙂

  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @Cseni ,

     

    From first look some of the column type choices you made aren't logical, but those can be changed.

     

    Can you please share your full patch function in text (so I can edit it) here so I can make some changes an recommendations?

     

     

  • Cseni Profile Picture
    70 on at

    Thank you for your help, here is the patch function: 

     

    Patch(
    'All data',
    Defaults('All data'),
    {
    'Amount incl. VAT': totalIncVAT,
    'Amount Excl. VAT': ExclVAT,
    'VAT (20%)': VAT
    }
    );
    Patch('All data',
    Defaults('All data'),
    {
    Employee: Text_Employee.Text,
    'Cost Centre': Dropdown_CostCentre.Selected,
    Date: Date_date.SelectedDate,
    'Expenses incurred in week ending': Date_ExpIncWE.SelectedDate,
    'Description/Notes':TextBox_Description.Value,
    VISA: Checkbox_VAT.Checked,
    Cash: Checkbox_Cash.Checked,
    Transport: Dropdown_Transport.Selected,
    'Nights Away':Value(TextBox_NightsAway.Value),
    Mileage: Value(TextBox_Mileage.Value),
    'Mileage total':Value(TextBox_MileageTotal.Value),
    'Type of Expense': Dropdown_TypeofExpense.Selected,
    'Expense Total': Value(Textbox_Expensetotal.Value),
    'Approved by': Dropdown_Approvedby.Selected,
    'Checked by': Dropdown_Checkedby.Selected,
    'Paid by': Dropdown_Paidby.Selected,
    'End Total': Value(TextBox_EndTotal.Value)
    }
    )

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Cseni ,

     

    Can you try the following code and check what Error is displayed on the top?

    IfError(
     Patch(
     'All data',
     Defaults('All data'),
     {
     'Amount incl. VAT': totalIncVAT,
     'Amount Excl. VAT': ExclVAT,
     'VAT (20%)': VAT
     }
     ), Notify("Error in Saving 1st Patch - "& FirstError.Message, NotificationType.Error, 2000); false,
     Patch(
     'All data',
     Defaults('All data'),
     {
     Employee: Text_Employee.Text,
     'Cost Centre': Dropdown_CostCentre.Selected,
     Date: Date_date.SelectedDate,
     'Expenses incurred in week ending': Date_ExpIncWE.SelectedDate,
     'Description/Notes':TextBox_Description.Value,
     VISA: Checkbox_VAT.Checked,
     Cash: Checkbox_Cash.Checked,
     Transport: Dropdown_Transport.Selected,
     'Nights Away':Value(TextBox_NightsAway.Value),
     Mileage: Value(TextBox_Mileage.Value),
     'Mileage total':Value(TextBox_MileageTotal.Value),
     'Type of Expense': Dropdown_TypeofExpense.Selected,
     'Expense Total': Value(Textbox_Expensetotal.Value),
     'Approved by': Dropdown_Approvedby.Selected,
     'Checked by': Dropdown_Checkedby.Selected,
     'Paid by': Dropdown_Paidby.Selected,
     'End Total': Value(TextBox_EndTotal.Value)
     }
     ), Notify("Error in Saving 2nd Patch - "& FirstError.Message, NotificationType.Error, 2000); false,
     Notify("Patch Successful", NotificationType.Success, 1000);
    )

     

    Hope this helps

  • Cseni Profile Picture
    70 on at

     

    Here you go: This is the error that comes up 

     

    error.PNG

     

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Cseni ,

     

    I think you have Checkbox information populated in some fields

    Can you put Value instead of Checked?

    Checkbox_VAT.Value

    and for all checkbox

     

    Let me know if this helps and if the error has changed

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 400 Most Valuable Professional

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard