cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GaryHounslow
Level: Powered On

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

mackaaij
Level: Powered On

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
Level: Powered On

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
Level: Powered On

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 Smiley Sad

 

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 103 members 3,982 guests
Recent signins:
Please welcome our newest community members: