I am trying to make my values turn red if any of my alarm tags are = 1, I know how to do the transform part to actually make it change colors, I just can’t get the If statement to show a value. I am not sure if I have a syntax issue or the way I referenced my tagpath is incorrect?
You need to either add the IF back to the start (since you have the then/else values at the end) or remove all the IF related stuff, and just have the 2 OR'd values, which will return a boolean without being in an IF.
Added the If back to front and that fixed it. Thanks for the help guys! if({view.params.TagPath.Alarms.Alm_H}|| {view.params.TagPath.Alarms.Alm_HH} || {view.params.TagPath.Alarms.Alm_L} || {view.params.TagPath.Alarms.Alm_LL},1,0)
Just a question to clarify. Your expression looks like you're taking the current value of each alarm passed through as a parameter rather than the tagpath string for the alarms. Depending on how your views are configured sometimes parameters won't properly pass value changes after the view is already opened. So be mindful of that.
If your tags are all together in one UDT then you may want to consider switching to just using an indirect tag binding pointed to the tag's AlarmMetrics, likely the .HasActive