Syntax Error on Token: 'BOUND CONST'

Hello! I am trying to animate a component so that it will change colour based off the status of a tag. I don’t think I am doing it the best way… Right now, I have a Data Type of this tag with different type structures bound to each status tag. I am trying to bind this to a custom component called DetermineColour so that whichever status is true will return a number that I can associate with a colour. I am using the code below and keep getting the error “Syntax Error on Token: ‘BOUND CONST’ (Line 1, Char 43)”. Please let me know what this means and if there is a better way to go about doing this. Thanks!

If {[default]Z1/C07_1_201Status/OTE2.value} = true Then DetermineColour = 0
Else If {[default]Z1/C07_1_201Status/RDY.value} = true Then DetermineColour = 2
Else If ({[default]Z1/C07_1_201Status/RNG_F.value} Or {[default]Z1/C07_1_201Status/RNG_R.value}) = true Then DetermineColour = 1
Else If {[default]Z1/C07_1_201Status/RST.value} = true Then DetermineColour = 4
Else DetermineColour = 3

You’re not using syntax that is valid for the expression language (the if/else procedural statements as if it were a scripting language).

You probably want the if or switch functions.

Hi Joelle -

I am also am trying the same thing. Did you ever find a resolution?