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:
  • 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

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard