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.
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.
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.
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.
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.
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.
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!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.