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

How to account for blank fields when retrieving user data? Getting 404 error

I am trying to make an HR hub which shows users some of their information. I am using a user account whose exclusive purpose is building these apps and sending automated notifications and therefore has no job title or manager. However, I am getting a 404 error for the account having no manager yet oddly not for having no title. This is an issue because the owner of the company is also getting this error (being the owner, he of course has no manager).

 

displayed data.PNGWhat I am attempting to display

 

function.PNGThe function which does not work

 

function2.PNGThe function which does work

1 ACCEPTED SOLUTION

Accepted Solutions
AnaGeorgiev
Level: Powered On

Re: How to account for blank fields when retrieving user data? Getting 404 error

If(
   IsEmpty(
             Filter(["","President"],
                     Office365Users.MyProfile().JobTitle in ["", "President"])
                      ),
  
"--",
  Office365Users.Manager(Office365Users.MyProfile().Id).GivenName &" " & Office365Users.Manager(Office365Users.MyProfile().Id).Surname)

Got it by referencing this thread:

https://powerusers.microsoft.com/t5/General-Discussion/Office365Users-Manager-throws-error-when-CEO-...

1 REPLY 1
AnaGeorgiev
Level: Powered On

Re: How to account for blank fields when retrieving user data? Getting 404 error

If(
   IsEmpty(
             Filter(["","President"],
                     Office365Users.MyProfile().JobTitle in ["", "President"])
                      ),
  
"--",
  Office365Users.Manager(Office365Users.MyProfile().Id).GivenName &" " & Office365Users.Manager(Office365Users.MyProfile().Id).Surname)

Got it by referencing this thread:

https://powerusers.microsoft.com/t5/General-Discussion/Office365Users-Manager-throws-error-when-CEO-...

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 47 members 4,481 guests
Please welcome our newest community members: