Click or drag to resize
OSIsoft, LLC

AFSearchTGetTotalCount Method

Returns the total count of the items that could be returned from the search query.

Namespace:  OSIsoft.AF.Search
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.8.440
Syntax
public override int GetTotalCount()

Return Value

Type: Int32
Returns the total count of the items that will be returned from the search query.

Implements

IAFSearchTGetTotalCount
Exceptions
ExceptionCondition
FormatException This exception is thrown if the ThrowOnError property is and there is a format error in the search query.
NotSupportedException This exception is thrown if the ThrowOnError property is and one of the filters is not supported or the query is too complex to be evaluated by the server.
Remarks

This method will evaluate the search query and return the total number of items that could be found by the query. This will not actually return any items.

Important note Important
The total count returned by this method maybe greater that the actual number of items returned from the search query if items must be filtered out on the client. For example, attribute value queries that use a data reference will need to be evaluated on the client if they are not captured (see CaptureValues).

Version Information

AFSDK

Supported in: 2.10.5
See Also
Enabling Operational Intelligence