Query Relationship Activity

Description

Executes a relationship query operation on a layer resource of a map service exposed by the ArcGIS Server REST API.

Usage

The Query Relationship activity allows you to perform a query using the object IDs from features on one layer to find related features on another layer. You could first use the Query Layer activity to fetch some features from one layer, then use the Get Feature Set Object IDs activity to get just the object IDs of those features, and then use the Query Relationship activity using the object IDs to find features from another layer that are related to the features from the original query.

Offline Support

In order for this activity to work when the device is offline, the application must run in the Geocortex Mobile App Framework with an offline map that includes the layer.

Geocortex Mobile App Framework does not support the following inputs:

Inputs

Url

Optional

Type: String

The URL to the ArcGIS layer to query. Either Url or Layer is required.

For example, http://server/arcgis/rest/services/<serviceName>/MapServer/<layerOrTableId>.

Layer

Optional

Type: esri.Layer (3.x, 4.x)*

The ArcGIS feature layer. Either Url or Layer is required.

Object Ids

Required

Type: Number | Number[]

An object ID or an array of object IDs to query for.

Relationship Id

Required

Type: Number

The ID of the relationship to be queried.

The relationships that this layer / table participates in are included in the Layer / Table Resource response. Records in tables / layers corresponding to the related table / layer of the relationship are queried.

Out Fields

Optional

Type: String | String[]

Attribute fields to include in the Feature Set.

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

Output Spatial Reference

Optional

Type: Number | String | esri.SpatialReference (3.x, 4.x)*

The spatial reference for the returned geometry.

If not specified, the geometry is returned in the spatial reference of the map.

Return Geometry

Optional

Type: Boolean

If true, each feature in the FeatureSet includes the geometry.

Set to false (default) if you do not plan to include highlighted features on a map since the geometry takes up a significant portion of the response.

Geodatabase Version

Optional

Type: String

The version of the geodatabase on which the query will be performed.

This property applies to feature services.

Requires ArcGIS Server 10.0+.

Definition Expression

Optional

Type: String

The definition expression to be applied to the related table / layer. From the list of records that are related to the specified objectIds, only those records that conform to this expression will be returned.

For example: POP2000 > 100000

Geometry Precision

Optional

Type: Number

The number of decimal places for the geometries returned by the query operation.

Max Allowable Offset

Optional

Type: Number

The maximum allowable offset to be used for generalizing geometries returned by the query operation.

The offset is in the units of Output Spatial Reference.

If Output Spatial Reference is not defined, the spatial reference of the service is used.

Requires ArcGIS Server 10+.

* Geocortex Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of application. Web AppBuilder 2D apps and Geocortex HTML5 viewers use version 3.x of the JavaScript API. Web AppBuilder 3D apps use version 4.x.

Outputs

results

Type: {[id:String]: esri.FeatureSet (3.x, 4.x)*}

The relationship query result returned by the query operation.

An object containing zero or more feature sets grouped by object ID.

* Geocortex Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of application. Web AppBuilder 2D apps and Geocortex HTML5 viewers use version 3.x of the JavaScript API. Web AppBuilder 3D apps use version 4.x.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Version Information

Supported from: Geocortex Viewer for HTML5 2.9, Web AppBuilder for ArcGIS 2.4.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.10