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 / Label displays specifi...
Power Apps
Answered

Label displays specific text depending on value in datacard

(0) ShareShare
ReportReport
Posted on by 114

Hi I'm very new to Power Apps. I have looked to see if my question has been answered previously and I can't seem to see that it has, but this could be due to being a novice and not entirely understanding the posts I have been googling, so please do forgive me, I only write this post as a last resort.

 

Would it be possible to have a label that states if Leave has been approved by looking at DataCardValue17, if it is blank, then the label should state "Leave not approved" (in red text) and if it has a date in it it states "Leave approved" in green text.

 

I've been doing some initial attempts (and not even tried to get to the font colour part yet) and my remedial (mainly Access experience has got me trying something like this:

 

on the dropdown on the left I've selected the Text element (apologies if these are the wrong terms)

=IF(IsBlank(DataCardValue17.Text=true,"Leave not approved","Leave approved")

 

this throws an error and I'm not sure why. Sorry if I'm really off, I realise I could be trying something that's not even possible.

 

Many thanks and I look forward to your responses.

 

 

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

    Hi @BenBennett321 ,

    You are missing a bracket and you do not need true

    If(
     IsBlank(DataCardValue17.Text),
     "Leave not approved",
     "Leave approved"
    )

     

    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

  • EricBLott Profile Picture
    248 on at

    A couple of things, it looks like you haven't closed your IsBlank() function (closing parenthesis isn't in your formula). Also, side note, you don't have to include =true in your If() statement.

    Could you provide the error message on the control?

  • Verified answer
    EricBLott Profile Picture
    248 on at

    Try this

     

    =If(IsBlank(DataCardValue17.Text),"Leave not approved","Leave approved")

  • WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    @EricBLott ,

    Not sure why you repeated my post . . . 

  • EricBLott Profile Picture
    248 on at

    Great minds 😉

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard