I need to insert values into an attribute that is called "Alarm," but if there is no attribute in PI AF, then I don't want to insert the alarm. How do you check to see if an attribute in PI AF is null before inserting into it?
Rusty with VB.NET but something like:
Dim alarmAttr As AFAttribute = element.Attributes["Alarm"]
If alarmAttr IsNot Nothing Then
' Insert values
If you have
AFAttribute attr = element.Attributes["Alarm"];
then you can just check
if(attr != null)
// do something
A more declarative way is
Thanks. I should have read the first word in the title of the post!
Retrieving data ...