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

Org Chart - Big red error

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

13 REPLIES 13
BenFetters
Level 8

Re: Org Chart - Big red error

Hi Gary,

 

I believe you could try making a collection of the office365users when the app starts up and try using that? If you look up Laura Rogers on youtube, and find her video that I believe is called "Organization Browser", she explains and shows a similar version of the Org Browser that uses collections and removes the error message problem that you have. 

 

Hope this helps.

 

Ben

GaryHounslow
Level: Powered On

Re: Org Chart - Big red error

Thanks for the reply

 

I just had a look at Laura Rogers video, she has pretty much made her own Org chart app which is a bit above my skill level at this stage.

 

Her work around was to check if it is the CEO, if it is then dont dislpay manager.  Unfortuantely we have circa 150 users that dont have managers in our active directory (consultants etc) so this solution wouldnt really work in my instance.

BenFetters
Level 8

Re: Org Chart - Big red error

Oh yes, you're right.

 

I looked more at the org app and I think I fould the solution. I attached some snapshots, one is of the original org browser and the other is with the added formula I put in. Basically, you can do an "If" statement and say something like: "If(IsBlank(Office365Users.DirectReports(First(Employee).Id)),ClearCollect(Manager, Office365Users.Manager(First(Employee).Id)))" - that should tell powerapps to only get the manager if there is one.

 

If this is confusing at all just let me know, I hope this helps though! I'd like to use this app as well and that would be a problem for me as well. Check out the attachments and hopefully that will make things more clearer.

 

Thanks. 

 

 

GaryHounslow
Level: Powered On

Re: Org Chart - Big red error

Thanks Ben, i'm not seeing any screenshots though ?

 

Gary

BenFetters
Level 8

Re: Org Chart - Big red error

Oh sorry about that! The orgbrowser is the one that Powerapps just as when you make the app and the NewOrgBrowser has what I tried changing in it. 

 

I also had to change one other formula for it to completly work in the SearchScreen on the app. I'll add a screen shot of that as well. So far it hasn't shown me any errors and seems to work perfectly so I hope it does the same for you! Let me know if it doesn't though and I'll try looking at it too. 

 

Ben

GaryHounslow
Level: Powered On

Re: Org Chart - Big red error

Hi Ben,

I have made those changes to mine but unfortunately still get the red error.  One other thing to note, I only get the red error when viewing the app on mobile or via an embedded version on a sharepoint page, it doesnt happen when previewing it online.

 

Many thanks

Gary

BenFetters
Level 8

Re: Org Chart - Big red error

You're welcome! 

 

Hope you can figure it out. Maybe there's a few other "Manager" equations in the app still or something similiar.

 

Good luck! 

 

Ben

GaryHounslow
Level: Powered On

Re: Org Chart - Big red error

I found one other manager equation in the app which has also been changed but still having the issue.

 

Ben, do you get the red error when viewing the app via mobile?

 

Gary

BenFetters
Level 8

Re: Org Chart - Big red error

No I'm not getting the error at any point when using the app on my phone. Are you getting the error at any certain point on the app or just right at the beginning? I checked over the app again it I'm pretty sure the only places where the formula needs to be changed is the homescreen when you select your profile (There might be two there) and then the rectangle in the GallerySearchUser in the SearchScreen. Maybe try going over the app one more time? 

 

Here's the formula again just in case: If(IsBlank(Office365Users.DirectReports(First(Employee).Id)), ClearCollect(Manager, Office365Users.Manager(First(Employee).Id)))

 

Let me know if it's still showing the error! 

 

Ben

 

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 238 members 5,267 guests
Please welcome our newest community members: