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

AF SDK Reference

AFVersion.GetParents Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFVersion.GetParents Method
Gets the list of all parent objects of the owner object without regard to the query date.

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

Syntax

public IList GetParents(
	AFSortField sortField,
	AFSortOrder sortOrder,
	int startIndex,
	int maxCount,
	out int totalCount
)
Public Function GetParents ( 
	sortField As AFSortField,
	sortOrder As AFSortOrder,
	startIndex As Integer,
	maxCount As Integer,
	<OutAttribute> ByRef totalCount As Integer
) As IList

Dim instance As AFVersion
Dim sortField As AFSortField
Dim sortOrder As AFSortOrder
Dim startIndex As Integer
Dim maxCount As Integer
Dim totalCount As Integer
Dim returnValue As IList

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

Parameters

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: IList
Returns the list of all parent objects of the owner object without regard to the query date. If there are no parents, then is returned.

Remarks

This returned list is different than the collection of objects returned by setting the QueryDate of the owning object and asking for its parents. That collection depends upon the QueryDate of the owning object. This returned list will contain all of the parent objects of the owning object without using a QueryDate.

Caution note Caution
Each call to this method will make a call to the server to load the list of parent objects. The list is not cached by the SDK.

Version Information

AFSDK


See Also

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