cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chris110
Helper I
Helper I

Help! Combo box Patch user to SharePoint - strange error

Hi everyone

 

I'm getting a few errors when trying to Patch a user's name back to SharePoint. The Patch is getting tripped up only on the user-selector fields (3 fields, same error). I'm using a Combo Box in PowerApps (as always). What's odd is that it's the same routine I've used for these types of fields time-and-time again - same Combo Box, settings, and Patch code. I just can't figure out why it's throwing an error this time!

 

Chris110_0-1655497406763.png

 

The Patch starts with Patch(SPList,Defaults(SPList), then goes into the fields. 

 

{RequestorName:
{'@odata.type': "#Mircrosoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: cmb_RequestedBy_newuser.Selected.Mail,
Department: "",
DisplayName: cmb_RequestedBy_newuser.Selected.DisplayName,
Email: cmb_RequestedBy_newuser.Selected.Mail,
JobTitle: "",
Picture: ""}
},

Here's the field in my SharePoint list:

Chris110_1-1655497533181.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

I figured it out...In the SharePoint list, there is a field called "Email."

 

Patch was getting confused and thought the Email parameter related to the user account I included was pointing back to the Email field in SharePoint, thus the error was "hey where's the user's email address?"

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Chris110 ,

Put this on a label and see if you get a valid email address

cmb_RequestedBy_newuser.Selected.Mail

 

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.

Visit my blog Practical Power Apps

 

Hi @WarrenBelz 

 

I can confirm that a valid email address was returned. I created another label with .DisplayName as well - same thing there too.

I figured it out...In the SharePoint list, there is a field called "Email."

 

Patch was getting confused and thought the Email parameter related to the user account I included was pointing back to the Email field in SharePoint, thus the error was "hey where's the user's email address?"

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,385)