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 / Change Text Color base...
Power Apps
Answered

Change Text Color based on another column

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm trying to change the text color of a label based on the status on another column but it is not working. So i have a Employee column and another column with status. I want text color for Employee column to be Red if the status column= Vacant, anything else is just black. 

 

I tried this but its not working and it looks like im missing some information.

If(ThisItem.Status.Value ="Vacant",Color.Red,Black)

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    subsguts Profile Picture
    1,259 Moderator on at

    See this example, this is the formula in the Color property.  Does this help?

    subsguts_0-1678812359008.png

     

  • punksterz626 Profile Picture
    on at

    It doesnt work. So i tried this If(ThisItem.Status ="Vacant",Red,Black) on the color property for the employee label but it is showing an error.

  • subsguts Profile Picture
    1,259 Moderator on at

    what's the error?

  • punksterz626 Profile Picture
    on at

    The function if has some invalid arguments. Location Title1_2.Color

  • subsguts Profile Picture
    1,259 Moderator on at

    What type of field is the Status? (combo box?)

     

  • punksterz626 Profile Picture
    on at

    single line text

  • subsguts Profile Picture
    1,259 Moderator on at

    Get rid of the ".Value"

  • punksterz626 Profile Picture
    on at

    I excluded that. The syntax If(ThisItem.Status ="Vacant",Red,Black) 

  • subsguts Profile Picture
    1,259 Moderator on at

    And you still get the same error?  Or it just doesn't work still?  I'm stepping away for a few hours, but will be happy to help when I return.  This should work as my example below uses a text field and a label too and works.

     

  • punksterz626 Profile Picture
    on at

    still doesnt work. I'm not sure if it matters but the thisitem.Employee label is inside a gallery. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard