Feature service GetCount method

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

int GetCount(int LayerOrTableID, string DefinitionExpression, QueryFilter QueryFilter, string VersionName)

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.

VersionName

Geodatabase version to query. This parameter applies only to feature services that expose geodatabases. If not specified, queries are made against the published map's version.

Return Value

GetCount returns an integer value representing the count of features or objects that meet the 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.

11/8/2016