AnsweredAssumed Answered

How to store NULLs in AF?

Question asked by dpilc on Oct 26, 2016
Latest reply on Oct 27, 2016 by dpilc

Hello Everyone,

 

I want to store in AF in attributes NULL values. How can i do it? What is more, I need to do it using AFSDK.

In AFSDK documentation I found this information(https://techsupport.osisoft.com/Documentation/PI-AF-SDK/Html/M_OSIsoft_AF_Asset_AFAttribute_SetValue_3.htm):

The new AFValue object for the attribute's value. If the AFValue.Value is DBNull.Value, then the attribute's value will be reset back to using the default value from the template. A value of DBNull.Value is not allowed if the attribute does not have a Template defined. UOMValueDefaultUOMValuePointType

The problem is here: how to set in AF values to be NULL by default? If it is not possible how can i achieve the goal to store somehow information, that the attribute has not been yet set.

 

Kind Regards,

Dawid

Outcomes