Select to view content in your preferred language

Query feature joined with table

649
2
04-26-2011 11:58 AM
TarlNeitzey
New Contributor
This seems like it should work pretty easily but I keep getting the following error:

[RPC Fault faultString="Unable to complete  operation." faultCode="400" faultDetail="Unable to complete Query operation."]

Here is the relevant code:

<esri:QueryTask id="queryTask"
   showBusyCursor="true"
   url="http://ws-63-neptune/ArcGIS/rest/services/PipelineWorkStatus/MapServer/1"
   useAMF="false"/>
 
<esri:Query id="query"
   outSpatialReference="{myMapStyle.spatialReference}"
   returnGeometry="true"
   text="527289">

<esri:outFields>
   <fx:String>COMPKEY</fx:String>
   </esri:outFields>
</esri:Query>

<esri:Map id="myMapStyle">
   <esri:ArcGISTiledMapServiceLayer
      url="http://ws-63-neptune/ArcGIS/rest/services/OrthosCached/MapServer"/>
   <esri:ArcGISDynamicMapServiceLayer id="legendLayer" name="Work"
      url="http://ws-63-neptune/ArcGIS/rest/services/PipelineWorkStatus/MapServer"/>
   <esri:GraphicsLayer id="myGraphicsLayer"
      graphicProvider="{queryTask.executeLastResult.features}" />
</esri:Map>


I can run the same query through the services pages on the server so the issue must be how I'm attempting to do this through code.
Tags (2)
0 Kudos
2 Replies
BorjaParés
Deactivated User
Hi!

I'm having the same problem.

I'm executen a QueryTask to a layer id via rest. The layer in the mxd has a join with a table. I get the: unable to complete operation error.

Any suggestios or ideas?

Thanks in advance!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
If you are preforming a query on a joined layer than you need to ensure you are using the full joined field name like table1.field1. Also ensure that you do not have the Shape and/or Objectid fields hidden in the mxd/msd that the mapservice comes from.
0 Kudos