Select to view content in your preferred language

eSearch error when searching multiple fields

1460
15
Jump to solution
08-27-2012 01:10 PM
JustinFultz
Regular Contributor
I am trying to search using multiple fields on the Enhanced search widget, version 2.9.0. I am at flex version 2.5 and recently upgraded my search widget to 2.9 specifically for this functionality. Everything is working as it should except when I add a second value in a search I get the follwoing error: RPC Fault faultStign-"Unable to complete operation." faultCode="400" faultDetail="Unable to complete Query operation."

I am able to do each search seperately, so I don't know what the issue is.

Here is my code:

<layer>    <definitionexpression></definitionexpression>    <enableexport>false</enableexport>    <name>Generation</name>               <url>http://dcpgisav/ArcGIS/rest/services/Operations/Generation/MapServer/0</url>             <expressions>              <expression alias="EMS Name" textsearchlabel="Search EMS Name:">               <values>                 <value prompt="Example: ARSENAL">upper(EMS_STATION_NAME) like upper('%[value]%')</value>                </values>              </expression>              <expression alias="Balancing Authority" textserachlabel="Select Balancing Authority...">               <values>                <value prompt="Select an area:" field="CTRLAREA" usedomain="true">CTRLAREA = '[value]'</value>                <value prompt="Select a fuel type:" field="PRIMARY_FUEL" usedomain="true">PRIMARY_FUEL = '[value]'</value>               </values>              </expression>             </expressions>


Any help is appreciated!!!
Tags (2)
0 Kudos
15 Replies
JacobBoyle
Deactivated User
Robert,

I am able to query against the data in the REST
0 Kudos
JacobBoyle
Deactivated User
Robert,

I am able to query against the data in the REST




Robert i changed the following
<definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
   <name>SRC Land Data</name>
   <url>http://pit-arcgis/arcgis/rest/services/Land/PA_Land_Data/MapServer/8</url>
   <expressions>
    <expression alias="Agreement Number" textsearchlabel="Search Agreement Number:">
     <values>
      <value prompt="Example: 061853" >AGMT_NUM = '[value]'</value>
     </values>
    </expression>
    <expression alias="Lessor" textsearchlabel="Search Lessor:">
     <values>
      <value prompt="Example: Bob Smith">upper(LESSOR) = upper('[value]')</value>
     </values>
    </expression>
   </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Land Data</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>AGMT_NUM</titlefield>
   <fields all="true"> 
and that fixed it...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jacob,

   So that seems like something is wrong in the field names you are requesting then...
0 Kudos
JacobBoyle
Deactivated User
Well, the search tool works when I set the Fields All= to true, and for any feature class where I set that to false, the queries do not work.  the workaround I am trying right now is doing the follofing for the field options:

 <field name="SHAPE" gridfieldonly="true" gridfield="false"/>
    <field name="SHAPE.area" gridfieldonly="true" gridfield="false"/>
    <field name="SHAPE.len" gridfieldonly="true" gridfield="false"/> 


This is hiding the fields I do not want to see.
0 Kudos
JacobBoyle
Deactivated User
OK, I've checked every service I am searching against.  Only 2 fail, this one and another point layer.  Both produce the error until i switch the Field All value to true.  Then everything is right as rain. 😄

Robert, thanks for your help and thanks for writing these great tools!
0 Kudos
ThanosDoganis
Occasional Contributor
OK, I've checked every service I am searching against.  Only 2 fail, this one and another point layer.  Both produce the error until i switch the Field All value to true.  Then everything is right as rain. 😄

Robert, thanks for your help and thanks for writing these great tools!


Dear friends,

I was stucked with the same error for two days. I found out that ESRI renamed area and length fields from SHAPE.area and SHAPE.len
to  SHAPE.STArea() and SHAPE.STLength() respectively. You have to update your configuration files when moving flex applications from 10.0 to 10.1.

Robert thanks again for your helpful apps.
0 Kudos