VBA code to recognize if a value is substituted

Discussion created by nmilano on Dec 12, 2013
Latest reply on Dec 13, 2013 by cramsey

Hi all,


I had a question regarding substituted values.  Is there a way to recognize whether a value (say, sent from PI Manual Logger) is a substituted value using VBA?


For example:


Private Sub Value59_DataUpdate()

Dim vrDate As Variant

Dim vrStatus As Variant

Value59.selected = True

If Value59.GetValue(vrDate, vrStatus) > 50 Then

Value59.LineColor = RGB(0, 150, 0)

Else: Value59.LineColor = RGB(250, 0, 0)

End If

If (“Value59 is a substituted value”) Then 

Call SubstitutedAlarm


End If

Value59.selected = False

End Sub



I've looked through the VBA reference file for PI processbook, but couldn't find anything related to substituted values.


Thank you in advance for the help!