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 / Have a text label that...
Power Apps
Unanswered

Have a text label that auto populates with mobile phone number from 365 connection. I have code to say if blank then add text "Mobile Phone Number"

(0) ShareShare
ReportReport
Posted on by 8

Have a text label that auto populates with mobile phone number from 365 connection. I have code to say if blank then add text "Mobile Phone Number".  Now if it is populated with a mobile number from 365 i want the text to be Size 13.5 color black and semibold.  But if it is blank then add the default text of "Mobile Phone Number" but make the text Size 13.5 color grey and Normal (i.e. not Semibold)

Categories:
  • madlad Profile Picture
    2,637 Moderator on at

    Hi!

     

    In the text color and font weight, you'll want to use the same If(IsBlank(...) function you use to display "Mobile Phone Number", but instead, have the options be: 

     

    If(IsBlank(...), FontWeight.Semibold, FontWeight.Normal)
    If(IsBlank(...), Color.Black, Color.Gray)

     

     

    Hope this helps!

  • GSkinner1976 Profile Picture
    8 on at

    This is the code I have but it is currently giving me an error 

    If(IsBlank(lb_mobilePhone),
    "Office365Users.UserProfileV2(User().Email).mobilePhone",
    "Mobile Phone Number", FontWeight.Normal, Color.LightGray)
  • GSkinner1976 Profile Picture
    8 on at

    Also how would i add italic as well

     

  • madlad Profile Picture
    2,637 Moderator on at

    Set the italic property to true/false depending on the IsBlank(...)

     

    Hope this helps!

  • GSkinner1976 Profile Picture
    8 on at

    I think i need an else argument in there but not sure how to do it i think i need something like 

    If (IsBlank(lb_mobilePhone),"Office365Users.UserProfileV2(User().Email).mobilePhone"

    ELSE

    if blank add text

    "Mobile Phone Number", FontWeight.Normal, Color.LightGray,

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
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard