Hello,
I am new to Power Apps and with my first Project I want to make Life a little easier for my user.
So when the User inherits a specific role a person field should be filled with his data. This works perfectly:
If(
Office365Users.MyProfile().JobTitle = "Role" And frm1.Mode = FormMode.Edit,
{
DisplayName: User().FullName,
Claims: "i:0#.f|membership|" & User().Email
},
Parent.Default
)
Now a person field should be prefilled with his or her manager. Also the manager of the manager should be prefilled within another person field. What I did until now is the following on DefaultSelectedItems:
If(
Office365Users.MyProfile().JobTitle = "Role" And frm1.Mode = FormMode.Edit,
{DisplayName: Office365Users.Manager(Office365Users.MyProfile().UserPrincipalName).DisplayName},
Parent.Default
)
and this works, the person field is actually pre-filled with the Managers Name BUT when I submit the data to SharePoint nothing is passed. The field stays blank. It only works if the user manually fills out the person field in the form.
For the managers manager its the following:
If(Office365Users.MyProfile().JobTitle = "Role" And frm1.Mode = FormMode.Edit,
{
DisplayName: Office365Users.Manager(Office365Users.Manager(Office365Users.MyProfile().Mail).Mail).DisplayName
},
Parent.Default)
same problem over here: the field is correctly filled out but no data is passed to sharepoint when submitted. The user always has to manually confirm the auto filled data.
Anyone can help? Thanks in advance