AFTransfer.FindTransfers Method (AFDatabase, String, AFSearchField, AFSortField, AFSortOrder, Int32)
- Last UpdatedNov 18, 2025
- 4 minute read
- PI System
- AF SDK 2024 R2
- Developer
Performs a text search within the AFDatabase to retrieve a collection
of AFTransfer objects that match the specified query string.
Namespace: OSIsoft.AF.EventFrame
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFNamedCollectionList<AFTransfer> FindTransfers( AFDatabase database, string query, AFSearchField field, AFSortField sortField, AFSortOrder sortOrder, int maxCount )
Public Shared Function FindTransfers ( database As AFDatabase, query As String, field As AFSearchField, sortField As AFSortField, sortOrder As AFSortOrder, maxCount As Integer ) As AFNamedCollectionList(Of AFTransfer) Dim database As AFDatabase Dim query As String Dim field As AFSearchField Dim sortField As AFSortField Dim sortOrder As AFSortOrder Dim maxCount As Integer Dim returnValue As AFNamedCollectionList(Of AFTransfer) returnValue = AFTransfer.FindTransfers(database, query, field, sortField, sortOrder, maxCount)
public: static AFNamedCollectionList<AFTransfer^>^ FindTransfers( AFDatabase^ database, String^ query, AFSearchField field, AFSortField sortField, AFSortOrder sortOrder, int maxCount )
static member FindTransfers : database : AFDatabase * query : string * field : AFSearchField * sortField : AFSortField * sortOrder : AFSortOrder * maxCount : int -> AFNamedCollectionList<AFTransfer>
Parameters
- database
- Type: OSIsoft.AFAFDatabase
The AFDatabase to search for the requested objects. - query
- Type: SystemString
The query 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'.
- field
- Type: OSIsoft.AFAFSearchField
Specifies which of the object's properties are searched. - sortField
- Type: OSIsoft.AFAFSortField
The field or property of the object used to sort the returned collection. - sortOrder
- Type: OSIsoft.AFAFSortOrder
The order that the returned collection is sorted. - maxCount
- Type: SystemInt32
The maximum number of objects to be returned.
Return Value
Type: AFNamedCollectionListAFTransferReturns the collection of AFTransfer objects which match the specified query string.
Remarks
An object matches the text search if the specified query is found in one of the object's properties specified by the field parameter.
| Consider using the new AFTransferSearch class for finding transfers instead of using this method. |