I have a Powerapp linked to a Sharepoint list. It's really basic. It's for users to submit praise for a colleague. They select them from a Person field and write their comments in a Multi Line Text field and submit to the List.
When a user selects the Person they're nominating - I want to store the selected person and retrieve (from O365 User Directory) their Manager, e-mail address etc.
It must be simple... but can't crack it!
That should be simple enough.
I'm going to assume a scenario where
The only thing needed is this code on that submit button
Patch(list_praise, Defaults(list_praise),
{
Title: "Praise Given",
Employee: {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Claims: "i:0#.f|membership|" & cbox_PeoplePicker.Selected.mail,
Department: "",
DisplayName: "",
Email: cbox_PeoplePicker.Selected.mail,
JobTitle: "",
Picture: ""},
Manager: {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Claims: "i:0#.f|membership|" &
Office365Users.ManagerV2(cbox_PeoplePicker.Selected.mail).mail
Department: "",
DisplayName: "",
Email: Office365Users.ManagerV2(cbox_PeoplePicker.Selected.mail).mail
JobTitle: "",
Picture: ""},
Comments: inp_Comments.Text
})
//; code to reset some of your input fields
Alter this scenario to whatever your inputs are called and you should be good to go!
Did this answer help you in any way? Consider to "Accept as Solution" and give a "Thumbs Up"
User | Count |
---|---|
261 | |
126 | |
101 | |
49 | |
47 |