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)
Are you applying this “If(ThisItem.Status.Value ="Vacant",Color.Red,Black)” in gallery? Any screenshot?
Great!!! If you can mark what I put below as the answer, that would be great and a kudo 🙂 Always appreciated 🙂
Yes, that will matter because you'll want to change the color on the item that is selected in the gallery. I can't get the formula exactly right as I'm heading out the door. but something like gallery.selecteditem.color needs to be set instead of the color property. Again, I can look into this more when I return.
actually it works now if i input it as follow "If(ThisItem.Status ="Vacant", Color.Red,Color.Black) whereas before i just typed the Red and Black as is.
still doesnt work. I'm not sure if it matters but the thisitem.Employee label is inside a gallery.
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.
I excluded that. The syntax If(ThisItem.Status ="Vacant",Red,Black)
Get rid of the ".Value"
single line text
What type of field is the Status? (combo box?)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.