Query Relationship Activity

Description

Executes a relationship query operation on a layer or table 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 in one layer or table to find related features in another layer or table. You could first use the Query Layer activity to fetch some features from one layer or table, and 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 or table that are related to the features from the original query.

Inputs

Url

Optional

Type: String

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

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

Layer

Optional

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

The ArcGIS feature layer or table to query. 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 or table participates in are included in the layer or table resource's response. This activity queries records in layers or tables that are related by the relationship identified by Relationship Id.

Out Fields

Optional

Type: String | String[]

Attribute fields to include in the feature set.

To return all fields, set Out Fields to the wildcard '*'.

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 service.

Return Geometry

Optional

Type: Boolean

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

Set to false (default) if you do not plan to include highlighted features on a map because 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 layer or table. From the list of records that are related to the specified object IDs, 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 host application. See Underlying Technologies for information.

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 host application. See Underlying Technologies for information.

Properties

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

Supported Environments

Environments capable of running this activity

Server

 

Client

Geocortex Web

Geocortex Mobile

Geocortex Viewer for HTML5

Web AppBuilder

Partially Supported Environments

Offline Support

In order for this activity to work when the device is offline, the activity must run in one of the following applications:

Version Information

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

© 2020 VertiGIS North America Ltd. All Rights Reserved.

Documentation Version 5.19