AFNotification.SetStatus Method (AFStatus, String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Set the notification's Status and ErrorMessage properties
immediately in the server.
Namespace: OSIsoft.AF.Notification
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void SetStatus( AFStatus status, string errorMessage )
Public Sub SetStatus ( status As AFStatus, errorMessage As String ) Dim instance As AFNotification Dim status As AFStatus Dim errorMessage As String instance.SetStatus(status, errorMessage)
public: void SetStatus( AFStatus status, String^ errorMessage )
member SetStatus : status : AFStatus * errorMessage : string -> unit
Parameters
- status
- Type: OSIsoft.AF.AnalysisAFStatus
The new AFStatus for the notification. - errorMessage
- Type: SystemString
The new error message associated with an error status for the notification. If this parameter is , then the ErrorMessage will not be modified. To clear the error message, set this parameter to an empty string.
Remarks
Changing the notification Status and ErrorMessage using this
method sets the values in the PI AF Server immediately and does not require the notification
to be checked out or checked in.
The ErrorMessage property is normally set to the reason that the notification
was set to an error status.
| When setting the Status or the ErrorMessage, it is more efficient to call this method to reduce the number of calls to the PI AF Server. |
| If the errorMessage is longer than 128 characters, it will be truncated. |