Microsoft Operations Manager

SetCustomField Method

The SetCustomFieldmethod sets the value of a user-defined custom field of an alert.

Alert.SetCustomField(FieldNumber Integer, FieldValue String)


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

Return Value



The following example shows how to store an array of values in the user-defined custom field of an alert.

Function StoreArrayInCustomField(objAlert, intField, arrValues)
	Dim intIndex
	Dim strFieldValue
	For intIndex = LBound(arrValues) To UBound(arrValues)
		' create a comma-separated string from the array
		strFieldValue = strFieldValue &
CStr(arrValues(intIndex)) & ","

	objAlert.SetCustomField(intField, strFieldValue)

	StoreArrayInCustomField = strFieldValue
End Function


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