Executes a relationship query operation on a layer or table resource of a map service exposed by the ArcGIS Server REST API.
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.
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>. Only URLs for layers that are present in the current map are accepted when running this activity in VertiGIS Studio Mobile. |
Layer |
Optional The ArcGIS feature layer or table to query. Either Url or Layer is required. |
Object Ids |
Required 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 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 geodatabase version on which to perform the query. This property applies to feature services. |
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. |
* VertiGIS Studio Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of host application. See Underlying Technologies for information.
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. |
* VertiGIS Studio Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of host application. See Underlying Technologies for information.
Running this activity in VertiGIS Studio Mobile results in an error if the results are empty.
Running this activity in VertiGIS Studio Mobile can return no more than one feature in the results.
For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.
For this activity to work when the device has intermittent connectivity to the network, the activity must run in the following application:
▪VertiGIS Studio Mobile
•The app must have a map area that includes both the layer or table being queried and the related layer or table.
•You must use the Layer input to specify the layer or table to query, not the Url input.
Supported from: Geocortex Viewer for HTML5 2.9, ArcGIS Web AppBuilder 2.4.