cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Save the current user using the powerapp in a sharepoint list.

In my screen, I want user to choose date and save.

But I want to save departmentname , username ,team , date (follow user pick).

Noona_2-1629775451902.png

Save the current user using the powerapp to a person column in a sharepoint list.

Noona_1-1629775290091.png

Please guide me about it.

 

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Run this at App OnStart

Set(gblUser,Office365Users.MyProfileV2())

You can then refer to the bits you want (example)

gblUser.department

 

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.

 

Anonymous
Not applicable

@WarrenBelz  How to use patch on select for choose date picker and save in MS list?

Noona_0-1629978628505.png

 

 

@Anonymous ,

Can you please post the code you have tried (in Text)

v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

I assume username is a person column which do not allow multiple selections:

vbofengmsft_1-1630467447363.png

If so,please try this formula:

With(
  {TheUser:Office365Users.MyProfileV2()},
  Patch(
     WFH,
     Defaults(WFH),
     {
       Title:"1",
       username:
        { 
         '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
         DisplayName:TheUser.displayName,
         Claims:"i:0#.f|membership|" & TheUser.mail,   
         Email:TheUser.mail,
         Department:TheUser.department,
         JobTitle:TheUser.jobTitle,
         Picture:User().Image
         },
      Date:DatePicker1.SelectedDate
     }
   )
)

vbofengmsft_2-1630468196843.png

Best Regards,

Bof

 

 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (3,392)