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 / Patch function gives e...
Power Apps
Answered

Patch function gives error while saving person type to Sharepoint List

(1) ShareShare
ReportReport
Posted on by
Hello,
 
I am new to Power app and facing error while saving data back to sharepoint list.
 
I have a assigned to comboBox, I have added this code at it item property:

Item = Office365Users.SearchUser({searchTerm:ComboBox_AssignedTo.SearchText})
 
and on Submit button On Select Property I have added patch function with below code.
 
Patch(
    'CHARM CTAS Action Tracker',
    Defaults('CHARM CTAS Action Tracker'),
    {
            'Assigned To':{
            '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:"i:0#.f|membership|"& ComboBox_AssignedTo.Selected.Mail,
            Department:ComboBox_AssignedTo.Selected.Department,
            DisplayName:ComboBox_AssignedTo.Selected.DisplayName,
            Email:ComboBox_AssignedTo.Selected.Mail,
            JobTitle:ComboBox_AssignedTo.Selected.JobTitle,
            Picture:""
        })
 
On clicking submit, I am getting error as :
The specified user i:0#.f|membership| could not be found.
clientRequestId: 57a528bd-367d-458f-9fb6-a061b1c32886
serviceRequestId: 1e5b78a1-c0ab-b000-5f48-eec95deb1af5
 
Please help with the solution.
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,433 Most Valuable Professional on at
    Hi @CU17011003-0​​​​​​​
    Assuming the Items of ComboBox_AssignedTo is (note small improvement)
    Office365Users.SearchUserV2(
       {
          searchTerm: Self.SearchText,
          top: 999
       }
    ).value
    and it a single selection Combo Box and 'Assigned To' is a single value Person field, then the Patch of
    Patch(
       'CHARM CTAS Action Tracker',
       Defaults('CHARM CTAS Action Tracker'),
       {
          'Assigned To':
          {
             Claims: "i:0#.f|membership|" & Lower(ComboBox_AssignedTo.Selected.Mail),
             Department: ComboBox_AssignedTo.Selected.Department,
             DisplayName: ComboBox_AssignedTo.Selected.DisplayName,
             Email: ComboBox_AssignedTo.Selected.Mail,
             JobTitle: ComboBox_AssignedTo.Selected.JobTitle,
             Picture: ""
          }
       }
    )
    should work - note you were missing the blue highlighted part and you do not need the 'odata.type' line now, although that does not really explain the error you have. As a debugging exercise, put this on a Label when you have selected something in the Combo Box and see if you get a valid email
    ComboBox_AssignedTo.Selected.Mail

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • WarrenBelz Profile Picture
    153,433 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   

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 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard