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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Label displays specifi...
Power Apps
Unanswered

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:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    152,851 Most Valuable Professional on at
    Re: Label displays specific text depending on value in datacard

    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
    Re: Label displays specific text depending on value in datacard

    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
    Re: Label displays specific text depending on value in datacard

    Try this

     

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

  • WarrenBelz Profile Picture
    152,851 Most Valuable Professional on at
    Re: Label displays specific text depending on value in datacard

    @EricBLott ,

    Not sure why you repeated my post . . . 

  • EricBLott Profile Picture
    248 on at
    Re: Label displays specific text depending on value in datacard

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard