Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFEventFrame.FindEventFramesByExtendedProperty Method (AFDatabase, String, IEnumerable(String), Int32)

AFEventFrame.FindEventFramesByExtendedProperty Method (AFDatabase, String, IEnumerable(String), Int32)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFEventFrame.FindEventFramesByExtendedProperty Method (AFDatabase, String, IEnumerable(String), Int32)
Retrieves a list of AFEventFrame objects that have the specified extended property string values defined for the event frame.

Namespace:  OSIsoft.AF.EventFrame
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static IList<KeyValuePair<string, AFEventFrame>> FindEventFramesByExtendedProperty(
	AFDatabase database,
	string propertyName,
	IEnumerable<string> values,
	int maxCount
)
Public Shared Function FindEventFramesByExtendedProperty ( 
	database As AFDatabase,
	propertyName As String,
	values As IEnumerable(Of String),
	maxCount As Integer
) As IList(Of KeyValuePair(Of String, AFEventFrame))

Dim database As AFDatabase
Dim propertyName As String
Dim values As IEnumerable(Of String)
Dim maxCount As Integer
Dim returnValue As IList(Of KeyValuePair(Of String, AFEventFrame))

returnValue = AFEventFrame.FindEventFramesByExtendedProperty(database, 
	propertyName, values, maxCount)
public:
static IList<KeyValuePair<String^, AFEventFrame^>>^ FindEventFramesByExtendedProperty(
	AFDatabase^ database, 
	String^ propertyName, 
	IEnumerable<String^>^ values, 
	int maxCount
)
static member FindEventFramesByExtendedProperty : 
        database : AFDatabase * 
        propertyName : string * 
        values : IEnumerable<string> * 
        maxCount : int -> IList<KeyValuePair<string, AFEventFrame>> 

Parameters

database
Type: OSIsoft.AFAFDatabase
The AFDatabase to search for the requested event frames.
propertyName
Type: SystemString
The name of the extended property to be searched.
values
Type: System.Collections.GenericIEnumerableString
The list of extended property values to match for the specified propertyName.
maxCount
Type: SystemInt32
The maximum number of event frames to be returned from the search.

Return Value

Type: IListKeyValuePairString, AFEventFrame
Returns a list of KeyValuePairTKey, TValue items where the key is the value of the extended property and the value is the AFEventFrame that matched the search for that key value. This allows the returned event frame to be matched with the specified extended property value without needing to load the full object from the server.

Remarks

This method will find the event frames that have an extended property with the specified propertyName and its value set to one of the values in the list of specified values. All extended property values of type String and Guid on an AFEventFrame are automatically indexed in the server to speed up the search on these types of property values. These are the only type of property values that can be searched.

Note Notes to Callers
Only event frames that have been saved to the server will be returned by this search. This search is only supported on PI AF Server 2.6 or later.

Important note Important
Consider using the new AFEventFrameSearch class for finding event frames instead of using this method.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

TitleResults for “How to create a CRG?”Also Available in