I have setup the Org Chart app for my company using the built in template. It is a great template, however, when selecting a user that has no manager assigned (we have quite a few), you get a big red error message at the top of the screen saying that they dont have a manager which is really annoying.
Has anybody found a way around stopping the error from displaying please? It is the only thing stopping me putting the app live to all users.
Many thanks
Gary
The formula I am using has the ! before the IsBlank so:
If(!IsBlank(Office365Users.Manager(First(Employee).Id)), ClearCollect(Manager, Office365Users.Manager(First(Employee).Id)));
If I remove the ! it doesnt display a manager for anybody at all.
The red error occurs when clicking on to an employee with no manager assigned
Gary
Although the big red error doesn't show up in the builder, I ran the App Checker which reported the offending field in "Runtime". In my case, it was in "Rectangle3_8".
I changed the formula from:
ClearCollect(Employee, ThisItem);
ClearCollect(PreviousEmployee, Employee);
Clear(Manager);Collect(Manager, Office365Users.Manager(First(Employee).Id));
Navigate(OrganizationScreen, Fade)
To:
ClearCollect(Employee, ThisItem);
ClearCollect(PreviousEmployee, Employee);
Clear(Manager);If(IsBlank(Office365Users.DirectReports(First(Employee).Id)), ClearCollect(Manager, Office365Users.Manager(First(Employee).Id)));
Navigate(OrganizationScreen, Fade)
That fixed the issue for me on PowerApps in iPhone.
I just noticed this "fix" removes the "Reports to" block when visiting a profile from search. The block does show up if you navigate back and forth between profiles though so this should be fixable. I'll look into this later on.
It looks like it's really impossible to work arround the big red error message until something is changed by Microsoft 😞
Here's a request to support try/catch in PowerApps you can vote for:
Another route might be for them to return an empty collection instead of a 404 status error.
Meanwhile, as a workaround, it looks like an Active Directory where everybody has a manager should work. The CEO can have the CEO as manager or be filtered out.
Hello, did you manage to fix this "reports to" removal?
⚠ Don't panic !
Simple Enable this:
Go to
«Experimental features» section -> Enable «Formula-level error management»
and Use this Formula: IfError(Office365Users.ManagerV2(User().Email).displayName,"");
Was glad to help 😊
User | Count |
---|---|
257 | |
110 | |
90 | |
51 | |
44 |