Hi I'm trying to solve two issues.
What I'm trying to achieve is to get the users manager into the SharePoint column on submit form, if the user does not have a manager a pre-set selected users is set for the field in this case itsupport.
I also only want to update the field if a selected value from another datacard have been selected, if it has not been selected then the person/group column should be blank. I show an example in issue number 2.
1. Error message when users do not have a manager assigned.
So i have a person/group column in SharePoint, i have that in my form in powerapps.
On the Update = i have the following.
If(DataCardValue11.Selected.Value = "Microsoft Office", Blank(),
If(ManagerStatus.Text = "true",
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Department: "",
DisplayName:"IT Support",
Claims:"i:0#.f|membership|" & "itsupport@somemail.com",
Email:"itsupport@itsupport@somemail.com",
JobTitle: "",
Picture: ""
},
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Department: "",
DisplayName:Office365Users.ManagerV2(Office365Users.MyProfileV2().id).displayName,
Claims:"i:0#.f|membership|" & Office365Users.ManagerV2(Office365Users.MyProfileV2().id).mail,
Email:Office365Users.ManagerV2(Office365Users.MyProfileV2().id).mail,
JobTitle: "",
Picture: ""
} ))
This way i can check if the user has a manager it returns true or false to my label ManagerStatus. But this label will show an error message, not visible to the users but still an error message in the app editor when i run it. Is there any way around this so no error message is displayed?
