Query Task Activity

Description:

Performs an ArcGIS Server query operation.

Inheritance Hierarchy:

System.Object
  System.Activities.Activity
    System.Activities.AsyncCodeActivity
      Geocortex.Workflow.Activities.QueryTask

Function:

This activity performs a query task on an ArcGIS map service, stand-alone table, or feature service. It then returns a feature set.

In a Workflow:

The Query Task activity could be used in a workflow that collected data or geometries from a user using a form, for example. The workflow would then use that data to perform a query using the Query Task activity. Then the results could be sent to the user using the Select Features activity.

Properties:

Name Description

In Arguments

Credentials

The network credentials that are sent to the host and used to authenticate the request.

Custom Parameters

Additional parameters to include in the request.

Disable Client Caching

If true, adds a timestamp parameter (_ts) to the request to prevent it from being loaded from the application's cache.

GDB Version

The geodatabase version on which the query will be performed. This property is only applicable to feature services only. Requires ArcGIS Server v.10.1+.

Geometry

The geometry to apply to the spatial filter. The spatial relationship as specified by spatialRelationship is applied to this geometry while performing the query. The valid geometry types are Envelope, Point, Multipoint, Polyline, or Polygon.

The geometry that will be used to filter the query.

Group By Fields for Statistics

The list of fields to group by during statistic analysis. Requires ArcGIS Server v.10.1+.

Layer Id

Obsolete: The ID of the layer to query.

Map Service Url

Obsolete: The URL of the REST MapService layer to query.

Max Allowable Offset

The maximum allowable offset to be used for generalizing geometries returned by the query operation. Requires ArcGIS Server v.10+.

Object IDs

The object IDs to query for. If object IDs are specified, other query parameters like Where are ignored.

Order By Fields

The sorting order for the results. Requires ArcGIS Server v.10.1+.

Out Fields

Attribute fields to include in the FeatureSet. Fields must exist in the map layer. You must list the actual field names rather than the alias names. Returned fields are also the actual field names. However, you are able to use the alias names when you display the results.

For optimal results, limit the output fields to only those you expect to use. Each query must have access to the Shape and Objectid Fields for a layer, but your list of fields does not need to include these two fields.

To return all fields, specify the wildcard '*' as the value of this parameter.

Out Spatial Reference

The spatial reference for the returned geometry. If not specified, the geometry is returned in the spatial reference of the underlying service. Requires ArcGIS for Server v.10+.

Out Statistics

The collection of fields to perform statistic analysis on. Requires ArcGIS Server v.10.1+.

Proxy Url

The URL to proxy the request through.

Query Service Url

The URL of the ArcGIS Server query service. For example: http://server/arcgis/rest/services/<serviceName>/MapServer/<layerOrTableId>.

Return Distinct Values

If true, the results will contain distinct values based on the fields specified in the Out Fields argument. Requires ArcGIS Server v.10.1.1+.

Return Geometry

If true, each feature in the FeatureSet includes the geometry. Since the geometry makes up a significant portion of the response, only use when you plan to use the geometry of the feature, for example to include them on a map. By default, this is false.

Return IDs Only

If true, only the object ID of each feature in the FeatureSet is returned. By default, this is false.

Note that, if true, the resulting FeatureSet has limited capabilities. Many common operations on the FeatureSet will fail. For example, the .Features property, and the .Count() and .First() methods will fail. Use the .ObjectIDs property to access the ID values. The .ObjectIDs property is not safe to use with external activities. To avoid problems create a new variable of type List<int> using .ObjectIDs.Cast(Of Int32).ToList() immediately following the Query Task activity.

Return M

If true, M values will be included in the results if the features have M values. Requires ArcGIS Server v.10.1+.

Return Z

If true, Z values will be included in the results if the features have Z values. Requires ArcGIS Server v.10.1+.

Source

The layer source to use when querying a dynamic layer. The Query Service URL must also reference a dynamic layer. For example: http://server/arcgis/rest/services/<serviceName>/MapServer/dynamicLayer. Requires ArcGIS Server v.10.1+.

Spatial Relate Function

The spatial relate function that can be applied while performing the query operation. Requires ArcGIS Server v.10.0+.

Spatial Relationship

The spatial relationship to be held between the input Geometry and each of the returned feature geometries. The default is esriSpatialRelIntersects.

Text

Shorthand for a literal search text on the display field, equivalent to: Where <displayField> like'%%'. The text is case sensitive. This parameter is ignored if the where parameter is specified. You can determine what the display field is for a layer using the ArcGIS Services Directory.

Time Extent

The time instant or the time extent to query.

Time Option

The time option to use if querying a dynamic layer. Requires ArcGIS Server v.10.1+.

Token

The token for accessing a secure ArcGIS task.

Where

A where clause of the query. Any legal SQL where clause operating on the fields in the layer is allowed, for example: where=POP2000 >35000.

Misc

Display Name

QueryTask

You can change the name of an activity to one that describes what it does. A descriptive name can make a workflow easier to interpret and maintain.

Out Spatial Reference WKID

Obsolete - This property is no longer supported. Use Out Spatial Reference.

Out Arguments

Exceeded Transfer Limit

Whether the number of records returned has exceeded transfer limit configured by the server administrator (maximum record count). Requires ArcGIS Server v.10.1+.

Results

The FeatureSet returned by the query task.

Version Information:

Supported from: Geocortex Essentials 3.0.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 4.11