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 / Error: Label populates...
Power Apps
Answered

Error: Label populates manager email using Office365Users and a Text control

(0) ShareShare
ReportReport
Posted on by 577 Super User 2024 Season 1

Hey everyone,

back with another question. This time we are getting a runtime error. I know there is a way around this I just can't put my finger on it for some reason.

The Photo: TM information for assigning an asset. We need to get the Managers name and email. Currently I'm using this:

 

If(
 IsBlank(txtEmail.Text),
 "",
 Office365Users.ManagerV2(Office365Users.ManagerV2(txtEmail.Text).mail).displayName
)

 

Now, I understand it shouldn't search unless something is in the text box but its still tossing a runtime error at me. Any thoughts? Work around?

KRider_0-1669050471470.png

 

KRider_1-1669050570841.png

 

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,545 Most Valuable Professional on at

    Hi @KRider ,

    Strange, but the code works fine here without error. Just to simplify it, try this

    If(
     Len(txtEmail.Text) > 0,
     Office365Users.ManagerV2(Office365Users.ManagerV2(txtEmail.Text).mail).displayName
    )

    and also remove any Default from your text box.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • KRider Profile Picture
    577 Super User 2024 Season 1 on at

    Thanks Warren! That did the trick. No text in default, that was all "hint" text. hahaha

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard