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 using People Pic...
Power Apps
Answered

Patch using People Picker via Combo Box

(0) ShareShare
ReportReport
Posted on by 43

I'm trying to create a PowerApp  for my team for an approval process. When the data is inputted it is then saves to a SharePoint list

Within the form, i have a ComboBox in which i need to select a user from and then when the user submits this is recorded as the Approver. However i cant seem to get it to work.  Within the SharePoint list the Approver column is a person field 

I have enabled the O365 User Connector too

 

SP List is called Accounts and the component is called ComboBox1

 

 

Patch(
 Accounts,
 If(IsBlank(varAccount), Defaults(Accounts),varAccount),
 { Approver: {

 Department: "",

 Claims: ComboBox1.Selected.mail,

 DisplayName: ComboBox1.Selected.displayName,

 Email: ComboBox1.Selected.mail,

 JobTitle: "",

 Picture: ""

 }, 

 

 Hope someone can point me in right direction with regards to Patch Command

Categories:
I have the same question (0)
  • Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @AndrewK93 ,

     

    Try this,

     

    Patch(
    Accounts,
    If(
    IsBlank(varAccount),
    Defaults(Accounts),
    varAccount
    ),
    {
    Approver: {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & ComboBox1.Selected.mail,
    DisplayName: ComboBox1.Selected.displayName,
    Email: ComboBox1.Selected.mail
    }
    }
    )

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

     

  • AndrewK93 Profile Picture
    43 on at

    Doesnt like that. I have tried similar however it has formula errors 

    AndrewK93_1-1713881116690.png

     

  • Verified answer
    Prabhakar_S Profile Picture
    735 Moderator on at

    I have tried this in a Form, Where I have a Person Column in the SharePoint named Employee and the combobox name is DataCardValue7. Additionally, I have saved the Title column as it is a required field in SharePoint.

    In the Onselect Property of the Submit Button:

    Patch(

        YourSharepointList,

        Defaults(YourSharepointList), // Use Defaults to create a new item in the list

        {

            Title: DataCardValue3.Text,

            Employee: {

                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

                Claims: "i:0#.f|membership|" & DataCardValue7.Selected.Mail,

                DisplayName: DataCardValue7.Selected.DisplayName,

                Email: DataCardValue7.Selected.Mail,

                Department: "",

                JobTitle: "",

                Picture: "" // Optional: Include additional user properties as needed

            }

        }

    );

     

    In the Items Property of the ComboBox:

    Office365Users.SearchUser({ searchTerm:Self.SearchText })

     

    By using the above formula I was able to save the data in to the Employee Column(Person Datatype).

     

    If you still encounter any issues, post the error with a screenshot.

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard