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

Notifications

Announcements

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

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 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard