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
Also note, that unfortunately more complex structures like your 3 tiers (tagpath, alarms, name) are also more likely to not receive their configured values the deeper the View is nested. This is most certainly a bug to do with race conditions, but definitely something to be aware of until it's fixed. The symptoms are random instances of views not showing the data for the values you're passing into their params (they will show the data for the view's default saved param values). It will be at random each page load which views are affected, and is more likely to occur with the more embedded views you have on the page