Hi @Anonymous ,
What value do you want to store within the isManager column? Text value or Boolean value?
Do you detect if current user is also a Manager?
If you just want to store the retrieved "DisplayName" value into the isManager column, please modify your formula as below:
Set(
userObj,
{
Profile: Office365Users.MyProfile(),
Picture: Office365Users.UserPhoto(User().Email),
Manager: Office365Users.Manager(User().Email),
isManager: First(Office365Users.SearchUser({searchTerm: Office365Users.Manager(User().Email).DisplayName})).DisplayName
}
);
If you want to detect if current user is also an Manager, you need to store a Boolean value in the 'isManager' field. You need to modify your formula as below:
Set(
userObj,
{
Profile: Office365Users.MyProfile(),
Picture: Office365Users.UserPhoto(User().Email),
Manager: Office365Users.Manager(User().Email),
isManager: If(
!IsEmpty(Office365Users.DirectReportsV2(User().Email).value),
true,
false
)
}
);
Then within your canvas app, you could reference the isManager column value through the following formula:
userObj.isManager
Please try above solution, then check if the issue is solved.
Regards,