cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GaryHounslow Helper III
Helper III

Re: Org Chart - Big red error

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

Highlighted
mackaaij
Frequent Visitor

Re: Org Chart - Big red error

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.

mackaaij
Frequent Visitor

Re: Org Chart - Big red error

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.

mackaaij
Frequent Visitor

Re: Org Chart - Big red error

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:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Error-handling-inside-PowerApps-Try-Catch/idi-p/...

 

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.

Helpful resources

Announcements
secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,955)