I have an app built that grabs the current user's Supervisor and auto populates a hidden field. This works great for users who have Supervisors assigned, but the form will NOT submit if the current users doesn't have a Supervisor assigned (such as Directors).
if I add this code to the 'DefaultSelectedItems', it works great.
If(
EditForm1.Mode=FormMode.New,
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Office365Users.Manager(User().Email).DisplayName,
DisplayName: Office365Users.Manager(User().Email).DisplayName
},
Parent.Default
)
How to I enhance this code to add a clause which will populate the Supervisor with a default user if one doesn't exist?