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

AF SDK Reference

AFElement.GetParents Method (AFReferenceType, AFSortField, AFSortOrder, Int32, Int32, Int32)

AFElement.GetParents Method (AFReferenceType, AFSortField, AFSortOrder, Int32, Int32, Int32)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFElement.GetParents Method (AFReferenceType, AFSortField, AFSortOrder, Int32, Int32, Int32)
Retrieves a paged collection of AFElement objects that reference this element using the specified AFReferenceType.

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

Syntax

public AFNamedCollectionList<AFElement> GetParents(
	AFReferenceType refType,
	AFSortField sortField,
	AFSortOrder sortOrder,
	int startIndex,
	int maxCount,
	out int totalCount
)
Public Function GetParents ( 
	refType As AFReferenceType,
	sortField As AFSortField,
	sortOrder As AFSortOrder,
	startIndex As Integer,
	maxCount As Integer,
	<OutAttribute> ByRef totalCount As Integer
) As AFNamedCollectionList(Of AFElement)

Dim instance As AFElement
Dim refType As AFReferenceType
Dim sortField As AFSortField
Dim sortOrder As AFSortOrder
Dim startIndex As Integer
Dim maxCount As Integer
Dim totalCount As Integer
Dim returnValue As AFNamedCollectionList(Of AFElement)

returnValue = instance.GetParents(refType, 
	sortField, sortOrder, startIndex, 
	maxCount, totalCount)
public:
AFNamedCollectionList<AFElement^>^ GetParents(
	AFReferenceType^ refType, 
	AFSortField sortField, 
	AFSortOrder sortOrder, 
	int startIndex, 
	int maxCount, 
	[OutAttribute] int% totalCount
)
member GetParents : 
        refType : AFReferenceType * 
        sortField : AFSortField * 
        sortOrder : AFSortOrder * 
        startIndex : int * 
        maxCount : int * 
        totalCount : int byref -> AFNamedCollectionList<AFElement> 

Parameters

refType
Type: OSIsoft.AF.AssetAFReferenceType
The AFReferenceType used when determining if a returned AFElement references this element.
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).
totalCount
Type: SystemInt32
The total number of objects that match the search criteria.

Return Value

Type: AFNamedCollectionListAFElement
Returns a collection containing the specified page of AFElement objects which reference this element using the specified AFReferenceType.

Remarks

If a QueryDate is defined for the current element, then that query date will be used to determine the collection of elements that are returned from this method.

Version Information

AFSDK


See Also

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