In my screen, I want user to choose date and save.
But I want to save departmentname , username ,team , date (follow user pick).
Save the current user using the powerapp to a person column in a sharepoint list.
Please guide me about it.
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 ,
Can you please post the code you have tried (in Text)
Hi @Anonymous :
I assume username is a person column which do not allow multiple selections:
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
}
)
)
Best Regards,
Bof
User | Count |
---|---|
163 | |
86 | |
71 | |
64 | |
62 |
User | Count |
---|---|
210 | |
149 | |
97 | |
84 | |
66 |