Color Change of Rectangle IF statement

I am trying to change the color of a rectangle based off the value of another label string value in the same template. Right now I have tried setting up the script based off a property change, but does not seem to work. I tried setting an expression under the binding of the rectangle fillpaint but did not like my syntax. I am pretty new to this and am obviously doing something wrong. Any help would be great.

if event.source.parent.getComponent('CurStatusV3Val').text == "3":
	event.source.fillPaint == '0,255,0'

You seem to be trying to use python where Ignition’s expression language is expected. Try this:

if({Root Container.CurStatusV3Val.text}="3", "0,255,0", "0,0,0")
1 Like

That solved it! Thanks, exactly what I needed.