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 / Patch to a sharepoint ...
Power Apps
Answered

Patch to a sharepoint Person Column with only the persons email address to start with.

(0) ShareShare
ReportReport
Posted on by 30

I have a form with a textinput box that will contain the email address of one of my organisations Office365 users.

 

I need to use the Patch function to patch this textinput box to a new record in a sharepoint list person column. This column should record the user who's email address was in the textinput box but I get an error message about the argument not matching the record type. I have tried both of the following approaches with the Patch function unsuccessfully.

 

Patch('MyList', Defaults('MyList'), Employee: UserEmailTextInput.Text)

 

Patch('MyList', Defaults('MyList'), Employee: Office365Users.SearchUser({searchTerm:UserEmailTextInput.Text}).DisplayName)

 

Neither works. Any solutions much appreciated.

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @AtomicPete ,

     

     I think you are on the right track with this:

    Patch('MyList', Defaults('MyList'), Employee: Office365Users.SearchUser({searchTerm:UserEmailTextInput.Text}).DisplayName)

     

    Maybe you can try:

    Patch(
     'MyList', 
     Defaults('MyList'), 
     Employee: First(Office365Users.SearchUser({searchTerm: UserEmailTextInput.Text})
     )
    )

     
    However, I am not aware what is required to create an employee of people type. You can take a look at this link to see how you can patch people field. https://www.about365.nl/2018/11/01/handling-sharepoint-lookup-and-people-fields-in-powerapps/

    Scroll down to patching people fields!

     

    Best,
    Zabi
    Mark this post as a solution, or kudo it if you found it be helpful. You can choose more than one answers as solutions, including your own answer. 🙂

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @AtomicPete 

     

    To Patch to SharePoint person column you need to provide specific object for person type column

     

    Check this video

    https://www.youtube.com/watch?v=g9ChYuTdNd4

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

    Thanks,
    Reza Dorrani, MVP
    YouTube
    Twitter

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @AtomicPete :

    Could you tell me if the Employee field allows multiple selections?

    I assume Employee do not allows multiple selections.

    Firstly, I want to explain why you can not update the Employee field.

    The point is you need to use a specific array to update the person field.

    Secondly,please try this solutin:

    1\add an Office365 users connection.

    1.JPG

    2\please try this code

     

    Patch('MyList', Defaults('MyList'),{Employee:{
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Department: "",
     Claims: "i:0#.f|membership|" & UserEmailTextInput.Text,
     DisplayName: Office365Users.UserProfileV2(UserEmailTextInput.Text).displayName,
     Email: UserEmailTextInput.Text,
     JobTitle: "",
     Picture: ""
     }
    })

     

    2.JPG3.JPG

    Best Regards,

    Bof

  • AtomicPete Profile Picture
    30 on at

    Thanks @v-bofeng-msft ,

     

    Your first section of code worked. I was not aware that the people columns in a Sharepoint list require such a complicated bit of code to patch to. All working now.

  • Caldwell1 Profile Picture
    6 on at

    Your video was awesome regarding Patching to a Person Column. But in the case of let’s say an ‘Admin List’ - and I want to patch users to that list who should have Admin Access, how can I patch other users names to that Admin List using the Person Column?

    Any help is much appreciated!

    Thanks!

    Jason

  • kasfour Profile Picture
    104 on at

    @v-bofeng-msft , I need your help please. I have the same issue, where I want to patch the below list, but I do not seem to get the right formula for the AccountMgr_x002e__x002f_Head: (Which is a Person type in the ShP. List)

    Patch(
    'Emp.Resign-List',
    Defaults('Emp.Resign-List'),
    {
    RequiredStatus:Dropdown3.Selected.Value,
    HITSID:HITSIDinput.Text,
    Name:NAMEinput.Text,
    JobTitle:JOBTITLEinput.Text,
    Campaign_x002f_Dept_x002e_:CAMPAIGNinput.Text,
    AccountMgr_x002e__x002f_Head:MGRinput.Text})

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard