Hi @faustocapellanj
I had setup SharePoint Person/Group field which automatically defaults to user manager.
To achieve this you have to add Office 365 Users connector.
In the OnVisible property of the Screen where the Form is located I have the following function:
UpdateContext(
{
Manager:Office365Users.Manager(First(UserProfileCollection).Id)
}
)Basically this LooksUp the manager of the person.
UserProgileCollection is a collection which is setup on the start of the app this way:
Collect(UserProfileCollection,Office365Users.MyProfile()))
Basically, it just collects all info available from the Office 365 Users connector on the User.
Then in your form for the Person/Group card add the following formula for the Default property:
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i:0#.f|membership|",Manager.Mail),
Department:Manager.Department,
DisplayName:Manager.DisplayName,
Email:Manager.Mail,
JobTitle:Manager.JobTitle,
Picture:""
}
You can do all the calling in the Default function but it will slow down your app, as well as, you can do it for any user in your organization if you know their email.