Microsoft Operations Manager

GetCustomField Method

The GetCustomFieldmethod gets the value of a user-defined custom field of an alert.

[VBScript]
Alert.GetCustomField(FieldNumber Integer)

Parameters

FieldNumber
Specifies the number of the user-defined custom field to get. Possible values for the FieldNumberparameter are 1, 2, 3, 4, and 5 to get the first through fifth custom fields, respectively.

Return Value

String

Examples

The following example shows how to get the value of the second user-defined custom field of an alert.

[VBScript] 
Function GetAlertCustomData()
	Dim objAlert
	Dim strCustomField2

	If (ScriptContext.IsAlert()) Then
		Set objAlert = ScriptContext.Alert
		strCustomField2 = objAlert.GetCustomField(2)
		Set objAlert = Nothing
	End If

	GetAlertCustomData = strCustomField2
End Function

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

Alert Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.