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 people picker to...
Power Apps
Answered

patch people picker to SharePoint person field

(0) ShareShare
ReportReport
Posted on by 11

I have a people picker in my app that is connected to a SharePoint person field. When I try and patch the field I get an error. The section of the patch formula is below. I get the error 'The type of this argument does not match the expected type 'Table'. Found type 'Record'.'  What is wrong with my formula?

'Strat Comm Partner Email':{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Lower(
LookUp(
Office365Users.SearchUser(),
DisplayName = TicketDetailStratCommPartnerComboBox.Selected.DisplayName
).Mail
),
Email: LookUp(
Office365Users.SearchUser(),
DisplayName = TicketDetailStratCommPartnerComboBox.Selected.DisplayName
).Mail,
Picture: "",
JobTitle: "",
Department: "",
DisplayName: TicketDetailStratCommPartnerComboBox.Selected.DisplayName
}

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @holland1994 

    If the formula is expecting a Table then most likely your person column in your list is allowing multiple selections.

    Please consider changing your Formula to the following:

    'Strat Comm Partner Email': 
     With({_user:Lower(LookUp(Office365Users.SearchUser(),DisplayName = TicketDetailStratCommPartnerComboBox.Selected.DisplayName)},
     Table(
     {
     Claims: "i:0#.f|membership|" & _user.Mail),
     Email: _user.Mail,
     Picture: "",
     JobTitle: "",
     Department: "",
     DisplayName: _user.DisplayName
     }
     ) 
     ) 

    You don't need the odata.type any longer and you should take the expensive searchusers function into one lookup - in the above it is done once and assigned to a scoped variable.

     

    I hope this is helpful for you.

  • holland1994 Profile Picture
    11 on at

    Now i'm getting an error with (LookUp(Office365Users.SearchUser(),DisplayName = TicketDetailStratCommPartnerComboBox.Selected.DisplayName)}  It says invalid argument type (record) expected text.

     

    Also, it doesn't like the .mail. it says invalid use of '.'

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @holland1994 

    Sorry, left out a closing paren.

    Formula should be:

    'Strat Comm Partner Email': 
     With({_user:
     Lower(
     LookUp(Office365Users.SearchUser(),
     DisplayName = TicketDetailStratCommPartnerComboBox.Selected.DisplayName
     )
     )
     },
     Table(
     {
     Claims: "i:0#.f|membership|" & _user.Mail),
     Email: _user.Mail,
     Picture: "",
     JobTitle: "",
     Department: "",
     DisplayName: _user.DisplayName
     }
     ) 
     ) 

    I separated it all above so I made sure I was matching parens.

  • holland1994 Profile Picture
    11 on at

    holland1994_0-1618579695593.png

    I'm still getting errors

  • holland1994 Profile Picture
    11 on at

    removed the Lower function which helped. Now I'm getting invalid number of arguments and unexpected use of colon

    holland1994_0-1618580210547.png

     

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @holland1994 

    Ha...I found where my missing ending paren went from before.  I've now got an extra one in there.

    Sorry, we type these formulas out by hand in the forum and there is no formula editor to aid in syntax.

    When you mentioned Lower...I realized I had move that part to the wrong place and left its closing paren in place.

    It's still early here, so my morning coffee has not kicked in yet 😴 â˜•

    Formula should be:

    'Strat Comm Partner Email': 
     With({_user: 
     LookUp(Office365Users.SearchUser(),
     DisplayName = TicketDetailStratCommPartnerComboBox.Selected.DisplayName
     ) 
     },
     Table(
     {
     Claims: "i:0#.f|membership|" & Lower(_user.Mail),
     Email: _user.Mail,
     Picture: "",
     JobTitle: "",
     Department: "",
     DisplayName: _user.DisplayName
     }
     ) 
     ) 

     

     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard