What is the best way to determine whether a tag has any alarms configured (active or not), given a tag path passed as a parameter? I’m trying to show (or hide) an alarm indicator graphic (embedded view) dependent on whether the tag has configured alarms (the tag path is passed as a text parameter to the embedded view).
I have tried using the script below as a transform on a custom property, supplying the tag path for the property binding and checking for existence of the “Alarms” property folder. This actually works but ends up spamming the log with “Error reading path” messages showing the modified path with a “.name” property appended. Note that I don’t ever request the “.name” property. I understand that “Alarms” is a folder containing other properties, not a property itself.
Custom Property Binding:
Log Error:
Eventually I transitioned to using an indirect tag binding to an Alarm property for the tag that should only exist if alarms are configured, then performing a !isNull() transform on it. This works and doesn’t create log spam… but this feels hackish.
Revised Custom Property Binding:
I think there must be a better/simpler way that I am just overlooking.