cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
_sourcecod3_
Level: Powered On

Patch - Create new record username and email of current logged in

Hi all,

 

How can I add username and email address of the current user logged in to a SharePoint list the Patch() function? This is what I have so far: 

 

Patch(dataSource, Defaults(dataSource),{Employee: {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",Claims:"i:0#.f|membership|" & Lower(User().Email), Department:"",  DisplayName:User().FullName,  Email:User().Email,  JobTitle:".",  Picture:"."}})

 Any help is appreciated

 

Thanks

2 REPLIES 2
Community Support Team
Community Support Team

Re: Patch - Create new record username and email of current logged in

Hi @_sourcecod3_ ,

 

First of all, your formula only contains one Employee field, is it the only Required field in your SharePoint list? You have to include all the Required fields in Patch. 

 

Secondly, please change the field formula to:

 

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(User().Email),
Department:"",
DisplayName:User().FullName,
Email:User().Email,
JobTitle:"",
Picture:""
}

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
_sourcecod3_
Level: Powered On

Re: Patch - Create new record username and email of current logged in

@v-monli-msftso that's what I'm confused with, how do I add the email address and update the column in the SharePoint list?

 

Thanks

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,217)