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 / The requested operatio...
Power Apps
Unanswered

The requested operation is invalid at button submit

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello and Good day,

 

Hi all I need a help,

 

Currently, I'm facing an error at Runtime after clicking submit button to the SharePoint list. I have attached the issue below:

daliladiyana_0-1644111207121.png

and the code at the ButtonSubmit is as follows:

 

 

Patch(

LeaveAppliedByUser,

Defaults(LeaveAppliedByUser),
{

LeaveType: Gallery5.Selected.LeaveType.Value,
FromDate: StartDate.SelectedDate,
ToDate: EndDate.SelectedDate,
LeaveTitile: txtLeaveTitile.Text,
LeaveDescription: txtLeaveDescription.Text,
Selectedby: Requestedby.Text,
TotalDays:daysdiff+1,
RequestedBy:
{'@odata.type' : "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(User().Email),
Department: "",
DisplayName: User().FullName,
Email: User().Email,
JobTitle: ".",
Picture: "."},
RequestedTo:
{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExapandedUser",
Claims: "i:0#.f|membership|" & Lower(_selectedApprover.Mail),
Department: "",
DisplayName: _selectedApprover.DisplayName,
Email: _selectedApprover.Mail,
JobTitle: ".",
Picture: "."}
}
);
Notify("Leave Applied Successfully", NotificationType.Success);

 

Thank you for your attention.

 

Regards,

Dalila

  

Categories:
  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @Anonymous How is the people picker field in sharepoint configured? Does it allows all users or only specific users from a SharePoint Group? If it is bound to a SharePoint Group and the user is not in that group sharepoint won't let you save the user.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @PowerRanger . Thank you for responding.  

     

    daliladiyana_0-1644214473342.png

    Do you mean this one ?

     

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @Anonymous no, but having a second Look at your request I would assume the following

     

    In your Patch Statement you are trying to set two Person fields. RequestedBy and RequestedTo... One of them fails. As User().Email should have a value I guess it is RequestedTo which fails.

     

    Place a Label on your screen and Set its Text value to_selectedApprover.Mail and check if it contains an email address or not.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @PowerRanger I did check the patch statement and yeah both person fields are working perfectly. Before publish, i tried to run the app, the error is gone and all the functions are working too. But after I publish it, I tried on the device the error still mentioned the same thing.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard