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

Patching the current user to SP list

Hi, I'm using this statement to build my collection to patch my sharepoint list.

 

Collect(Order; {Day:Today(); FoodItem:ThisItem.FoodItem; Quantity:1; User:ThisItem.Author; Price:LookUp(Food; ID = ThisItem.FoodItem.Id).Price})

 

What would I have to use instead of "ThisItem.Author" to write the user currently running the app to the collection and back to sharepoint?

1 REPLY 1
Super User
Super User

Re: Patching the current user to SP list

Try replacing "ThisItem.Author" with this formula:

 

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

I have used this with Patch successfully. However, I haven't tried it in a collection then used it with Patch() but it is worth a try.



--------------------------------------------------------------------------------
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.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

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 Solution Authors
Top Kudoed Authors
Users online (5,016)