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

AF SDK Reference

AFAnalysis.FindAnalyses Method (AFDatabase, String, String, Nullable(Int16), AFCategory, AFAnalysisTemplate, AFElement, AFStatus, AFSortField, AFSortOrder, Int32, Int32)

AFAnalysis.FindAnalyses Method (AFDatabase, String, String, Nullable(Int16), AFCategory, AFAnalysisTemplate, AFElement, AFStatus, AFSortField, AFSortOrder, Int32, Int32)

  • Last UpdatedNov 18, 2025
  • 7 minute read
AFAnalysis.FindAnalyses Method (AFDatabase, String, String, Nullable(Int16), AFCategory, AFAnalysisTemplate, AFElement, AFStatus, AFSortField, AFSortOrder, Int32, Int32)

Note: This API is now obsolete.

Performs a paged search within the AFDatabase to retrieve a collection of AFAnalysis objects that match the specified query strings and additional filters.

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

Syntax

[BrowsableAttribute(false)]
[ObsoleteAttribute("This method has been replaced by the 'AFAnalysisSearch' class using the 'Name', 'Description', 'GroupID', 'Category', 'Template', 'Target', and 'Status' filters.")]
public static AFNamedCollectionList<AFAnalysis> FindAnalyses(
	AFDatabase database,
	string nameFilter,
	string descriptionFilter,
	short? groupID,
	AFCategory category,
	AFAnalysisTemplate template,
	AFElement target,
	AFStatus status,
	AFSortField sortField,
	AFSortOrder sortOrder,
	int startIndex,
	int maxCount
)
<BrowsableAttribute(false)>
<ObsoleteAttribute("This method has been replaced by the 'AFAnalysisSearch' class using the 'Name', 'Description', 'GroupID', 'Category', 'Template', 'Target', and 'Status' filters.")>
Public Shared Function FindAnalyses ( 
	database As AFDatabase,
	nameFilter As String,
	descriptionFilter As String,
	groupID As Short?,
	category As AFCategory,
	template As AFAnalysisTemplate,
	target As AFElement,
	status As AFStatus,
	sortField As AFSortField,
	sortOrder As AFSortOrder,
	startIndex As Integer,
	maxCount As Integer
) As AFNamedCollectionList(Of AFAnalysis)

Dim database As AFDatabase
Dim nameFilter As String
Dim descriptionFilter As String
Dim groupID As Short?
Dim category As AFCategory
Dim template As AFAnalysisTemplate
Dim target As AFElement
Dim status As AFStatus
Dim sortField As AFSortField
Dim sortOrder As AFSortOrder
Dim startIndex As Integer
Dim maxCount As Integer
Dim returnValue As AFNamedCollectionList(Of AFAnalysis)

returnValue = AFAnalysis.FindAnalyses(database, 
	nameFilter, descriptionFilter, groupID, 
	category, template, target, status, 
	sortField, sortOrder, startIndex, 
	maxCount)
public:
[BrowsableAttribute(false)]
[ObsoleteAttribute(L"This method has been replaced by the 'AFAnalysisSearch' class using the 'Name', 'Description', 'GroupID', 'Category', 'Template', 'Target', and 'Status' filters.")]
static AFNamedCollectionList<AFAnalysis^>^ FindAnalyses(
	AFDatabase^ database, 
	String^ nameFilter, 
	String^ descriptionFilter, 
	Nullable<short> groupID, 
	AFCategory^ category, 
	AFAnalysisTemplate^ template, 
	AFElement^ target, 
	AFStatus status, 
	AFSortField sortField, 
	AFSortOrder sortOrder, 
	int startIndex, 
	int maxCount
)
[<BrowsableAttribute(false)>]
[<ObsoleteAttribute("This method has been replaced by the 'AFAnalysisSearch' class using the 'Name', 'Description', 'GroupID', 'Category', 'Template', 'Target', and 'Status' filters.")>]
static member FindAnalyses : 
        database : AFDatabase * 
        nameFilter : string * 
        descriptionFilter : string * 
        groupID : Nullable<int16> * 
        category : AFCategory * 
        template : AFAnalysisTemplate * 
        target : AFElement * 
        status : AFStatus * 
        sortField : AFSortField * 
        sortOrder : AFSortOrder * 
        startIndex : int * 
        maxCount : int -> AFNamedCollectionList<AFAnalysis> 

Parameters

database
Type: OSIsoft.AFAFDatabase
The AFDatabase to search for the requested objects.
nameFilter
Type: SystemString
The name filter string used for finding objects.

The query string (or match pattern) can include regular characters and wildcard characters. Regular characters must match exactly the characters specified in the query string. Wildcard characters can be matched with arbitrary fragments of the query string. Wildcard characters can be escaped using the single backslash (\) character. Use a double backslash (\\) to match a single backslash. The syntax of the query string has the following rules:

  • If or empty string, then everything will be matched.
  • If no wildcards, then an exact match on the query string is performed.
  • Wildcard * can be placed anywhere in the query string and matches zero or more characters.
  • Wildcard ? can be placed anywhere in the query string and matches exactly one character.
  • One character in a set of characters are matched by placing them within [ ]. For example, a[bc] would match 'ab' or 'ac', but it would not match 'ad' or 'abd'.
  • One character in a set of characters are not matched by placing them within [! ]. For example, a[!bc] would match 'ad', but it would not match 'ab', 'ac', or 'abd'.
  • A character in a range of characters from first to last are matched using the following syntax: [first - last]. For example, a[a-c] would match 'aa', 'ab', or 'ac', but it would not match 'ad' or 'abc'.

descriptionFilter
Type: SystemString
The description filter string used for finding objects.

The query string (or match pattern) can include regular characters and wildcard characters. Regular characters must match exactly the characters specified in the query string. Wildcard characters can be matched with arbitrary fragments of the query string. Wildcard characters can be escaped using the single backslash (\) character. Use a double backslash (\\) to match a single backslash. The syntax of the query string has the following rules:

  • If or empty string, then everything will be matched.
  • If no wildcards, then an exact match on the query string is performed.
  • Wildcard * can be placed anywhere in the query string and matches zero or more characters.
  • Wildcard ? can be placed anywhere in the query string and matches exactly one character.
  • One character in a set of characters are matched by placing them within [ ]. For example, a[bc] would match 'ab' or 'ac', but it would not match 'ad' or 'abd'.
  • One character in a set of characters are not matched by placing them within [! ]. For example, a[!bc] would match 'ad', but it would not match 'ab', 'ac', or 'abd'.
  • A character in a range of characters from first to last are matched using the following syntax: [first - last]. For example, a[a-c] would match 'aa', 'ab', or 'ac', but it would not match 'ad' or 'abc'.

groupID
Type: SystemNullableInt16
The specified group identifier object to match. Specify to not search by group ID.
category
Type: OSIsoft.AFAFCategory
Specify that returned analyses must have this category. You can specify None to return analyses that do not have any category. To not filter by analysis category, then specify for this parameter.
template
Type: OSIsoft.AF.AnalysisAFAnalysisTemplate
Specify that returned analyses must have this template. You can specify None to return analyses that do not have any template. To not filter by analysis template, then specify for this parameter.
target
Type: OSIsoft.AF.AssetAFElement
The AFElement that is the target of the desired AFAnalysis objects. You can specify None to return analyses that do not have any target. To not filter by target, then specify for this parameter.
status
Type: OSIsoft.AF.AnalysisAFStatus
The Status of the desired AFAnalysis objects must match this status. Specify None to not search by status.
sortField
Type: OSIsoft.AFAFSortField
The field or property of the object used to sort the returned collection. This value should not be changed between calls when attempting to get the next page of items.
sortOrder
Type: OSIsoft.AFAFSortOrder
The order that the returned collection is sorted. This value should not be changed between calls when attempting to get the next page of items.
startIndex
Type: SystemInt32
The starting index (zero based) of the items to be returned.
maxCount
Type: SystemInt32
The maximum number of objects to be returned per call (the page size).

Return Value

Type: AFNamedCollectionListAFAnalysis
Returns a collection containing the specified page of AFAnalysis objects which match the specified nameFilter string and filters.

Exceptions

ExceptionCondition
NotSupportedException This exception is thrown when calling this method while connected to an AF AF Server before 2.7.

Remarks

An object matches the search if the specified nameFilter is found in the object's Name property and the specified descriptionFilter is found in the object's Description property. The returned list can be filtered even more by specifying one or more of the following: group ID, analysis category, analysis template, analysis target element, or status.

Important note Important
Consider using the new AFAnalysisSearch class for finding analyses instead of using this method.

Version Information

AFSDK

Supported in: 2.8.5, 2.8, 2.7.5, 2.7
Obsolete (compiler warning) in 3.1.1
Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5
Obsolete (compiler warning) in 2.10.0
Obsolete (compiler warning) in 2.10
Obsolete (compiler warning) in 2.9.5
Obsolete (compiler warning) in 2.9

See Also

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