Perspective design background color numeric

Pls help Me.

  i use expression  change background color  for numeric label.

but the color not change by condition .
how can solve the problem?

thank you

I would use “Property binding” or “Tag Binding” instead and add a Map transform with “Color” as Output Type

1 Like

i will try
thank you

can not show background color also.

Can you confirm what version you’re using? I believe I’ve verified when this might have been introduced as part of 8.0.15, but if you’re using a version before that we might need to investigate something else.

1 Like

We use version 8.0.13.

Well that was embarrassing… My binding was actually faulted because I hadn’t pressed Enter to complete the values for my Map transform. The Numeric Entry Field is actually working correctly.

Your specific issue is that you’re trying to supply Java colors for Perspective properties, which require RGB or Hex values. Your binding is evaluating correctly, but the component doesn’t know how to interpret the value you’re supplying. Switch to the Map transform I recommended and your problem will go away. Or you can supply the color values in a different manner. The “Colors” expressions should only be used in Vision. I’ll see if we can remove them while in the Perspective context.

This should work:

if({[KCC_Tag]KWH/KCC1/D05ABW01}>5, 'rgb(0,255,0)', 'rgb(223,222,222)')
1 Like

It OK!
thank very much.

1 Like