Feature Service GetCount method

Gets the number of rows that will be returned by the query.

 

GetCount(int LayerOrTableID, string DefinitionExpression, QueryFilter QueryFilter)

 

Parameter

Description

LayerOrTableID

The ID of the layer or table from which to delete features or objects.

DefinitionExpression

A type’s definition expression.

QueryFilter

Describes the features or objects to delete based on attribute expressions, time and/or spatial filters.

 

Return Value

 

An integer value representing the count of features or objects that meet QueryFilter criteria and definition expression.

 

Remarks

 

If a layer or table is of interest, keep the definition expression as empty. If a type is of interest, use the type property’s field name and TypeID value in the definition expression.

 

Definition expressions are separate from and can be applied in addition to QueryFilters. Definition expressions can be used to apply queries to a specific type within a layer or table. You can also use a definition expression to easily apply the same query to all layers in the service.