web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If the users manager i...
Power Apps
Answered

If the users manager is blank

(0) ShareShare
ReportReport
Posted on by 2,567

Hi I'm trying to solve two issues.

What I'm trying to achieve is to get the users manager into the SharePoint column on submit form, if the user does not have a manager a pre-set selected users is set for the field in this case itsupport.

 

I also only want to update the field if a selected value from another datacard have been selected, if it has not been selected then the person/group column should be blank. I show an example in issue number 2.

 

1. Error message when users do not have a manager assigned.

So i have a person/group column in SharePoint, i have that in my form in powerapps.

On the Update = i have the following.

 

If(DataCardValue11.Selected.Value = "Microsoft Office", Blank(),
If(ManagerStatus.Text = "true",
{ 
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Department: "", 
 DisplayName:"IT Support",
 Claims:"i:0#.f|membership|" & "itsupport@somemail.com", 
 Email:"itsupport@itsupport@somemail.com",
 JobTitle: "",
 Picture: ""
},


{ 
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Department: "", 
 DisplayName:Office365Users.ManagerV2(Office365Users.MyProfileV2().id).displayName,
 Claims:"i:0#.f|membership|" & Office365Users.ManagerV2(Office365Users.MyProfileV2().id).mail, 
 Email:Office365Users.ManagerV2(Office365Users.MyProfileV2().id).mail,
 JobTitle: "",
 Picture: ""
} ))

 

This way i can check if the user has a manager it returns true or false to my label ManagerStatus. But this label will show an error message, not visible to the users but still an error message in the app editor when i run it. Is there any way around this so no error message is displayed?

 

image1.png

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @JimmyWork ,

     

    How did you define the ManagerStatus Label? like this?

    IsBlank(Office365Users.ManagerV2(User().Email).mail)

    If you want to avoid the red wave error when the user don't have a manager, I afraid that there is no way to achieve your needs in PowerApps currently since the Error Message is from the API, we have to no function to eliminate or avoid such error. 

    Hope this helps.

    Sik

  • JimmyW Profile Picture
    2,567 on at

    @v-siky-msft 

     

    I used the following.

    IsBlank(Office365Users.ManagerV2(Office365Users.MyProfileV2().id).displayName)

    Seems that .id is the one looking up the best way.

    But i wonder do i need the ManagerStatus label or can i just put this in the update field.

    If(IsBlank(Office365Users.ManagerV2(Office365Users.MyProfileV2().id).displayName),

     

    Will that show the error to the user?

    The ManagerStatus label will not show the error to the end user as it is hidden.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard