I'm encountering an issue with my application's Office365Users.DirectReports function. The error message states:
office365users.directreports failed: the function 'directreports' has an invalid value for parameter 'userid' - a blank value was passed to it where it was not expected. Please make sure that a valid argument is passed to the function.
To provide some context, I'm using a text field where the manager's email is entered and the Office365Users.DirectReports function should return the direct reports:
Office365Users.DirectReports(Head_Department_Name.Value)
The application runs fine, but this error appears during data loading, and I need to hide this notification.
Could anyone advise on how to prevent this error or hide the notification?
Thanks in advance for your help!
I tried to modify the following code but without success:
If(!IsBlank(ThisItem.CreatedByUser),
Office365Users.UserProfile(ThisItem.CreatedByUser).DisplayName
)