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

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,029)