Whey doesn't this expression work in vision?

It’s just an and gate for 2 bools.

I get this alarm.

It means your binding is to a component property that is not a boolean.

I am trying to change a color using two bools. How do I make this work?

Vision doesn't have transforms for expressions. You will need to either wrap your expression in if() and return deliberate colors with toColor(), or place that expression on a custom boolean property and use styling.

1 Like

Option 1

  1. Add a custom property (type: boolean) to your component.
  2. Use the same expression binding you already have to return a true/false result.
  3. Use the style customizer on the component, using your custom property as the 'driving' property, to affect the styles.

Option 2

Use a more complex expression using the toColor function to return an actual color.

toColor(
    if({tag1} && {tag2}, "00FF00", "000000")
)
1 Like

Thank you.