I want to look at a string from two tags and if they both are not matching then I want to change states of a background color. Is this possible? Assuming you have to do an expression.
Yes, you can reference multiple tags in an expression. You also shouldn't need an expression transform, though you might find a map transform handy.
My example below just uses a single expression.
if (
// test condition. returns true if either/both tags match the given string
{[default]Tag1} = "Running"
||
{[default]Tag2} = "Running",
// true return
"#00FF00",
// false return
"#FF0000"
)
Edit: using map transforms, it would be something like this:
Preferably, you'd get your statuses to be booleans rather than strings so you don't need to rely on string comparisons (can break if different capitalization is used, for instance). Or make an expression tag with the above logic, then use a tag binding with a map transform to select the color.
Lots of ways to do this, but big picture you should aim to minimize how much manual setup is required for this sort of animation
1 Like