Using Enhanced Search Widget 3.6.9 Keep getting error message.

3698
8
11-26-2014 12:26 PM
MichaelLee
New Contributor

I have the esearch widget 3.6.9 set up to search nine different layers, seven work just fine but two of them return this error:

 

[RPC Fault faultString="Failed to execute query." faultCode="400"faultDetail=""]

 

Running ArcGIS Server 10.2.2

Running ArcGis Viewer for Flex 3.6

All layers are feature classes within the same versioned sde feature data set

Rest endpoints are correct.

Field names are correct.

 

xml code for each posted below:

 

         <layer>

            <definitionexpression></definitionexpression>

            <enableexport>false</enableexport>

            <name>Preliminary Repair Search</name>

            <url>http://gpsdgis:6080/arcgis/rest/services/GPSDWebMap/MapServer/16</url>

            <expressions>

                <expression alias="Preliminary Repair Number" textsearchlabel="Search By Preliminary Repair Number:">

                    <values>

                        <value prompt="Example: 3216">REPNUMBER like '[value]'</value>

                    </values>

                </expression>

            </expressions>

            <graphicalsearchlabel>Use one of the graphical search tools to select preliminary repair</graphicalsearchlabel>

            <spatialsearchlayer>true</spatialsearchlayer>

            <titlefield>REPNUMBER</titlefield>

            <fields all="false">

                <field name="REPNUMBER" alias="Repair Number"/>

                <field name="MH_ID" alias="Manhole ID"/>

                                <field name="Status" alias="Status"/>

            </fields>

            <links>

            </links>

            <zoomscale usegeometry="true" zoompercent="2.0"></zoomscale>

        </layer>

 

        <layer>

            <definitionexpression></definitionexpression>

            <enableexport>false</enableexport>

            <name>Final Repair Search</name>

            <url>http://gpsdgis:6080/arcgis/rest/services/GPSDWebMap/MapServer/17</url>

            <expressions>

                <expression alias="Final Repair Number" textsearchlabel="Search By Final Repair Number:">

                    <values>

                        <value prompt="Example: 1578">Rep_Num_1 like '[value]'</value>

                    </values>

                </expression>

            </expressions>

            <graphicalsearchlabel>Use one of the graphical search tools to select final repair</graphicalsearchlabel>

            <spatialsearchlayer>true</spatialsearchlayer>

            <titlefield>Rep_Num_1</titlefield>

            <fields all="false">

                <field name="Rep_Num_1" alias="Repair Number" />               

                <field name="Rep_Num_1" alias="Final Repair Number"/>

                <field name="GPS_NAME_1" alias="Project Number"/>

                <field name="RID" alias="Repair ID Number"/>

                <field name="FieldBook" alias="Field Book"/>

                <field name="FieldBookPages" alias="Field Book Page(s)"/>

                <field name="Hyperlink_2" alias="Show Image" hyperlinkgridfield="true"

                    hyperlinkaliastext="Show Sketch" />

            </fields>

            <links>

 

                <link includeinresults="true" field="URL" alias="Repair Sketch">

                    <![CDATA[{Hyperlink_2}]]>

                    <icon><![CDATA[assets/images/pdf.png]]></icon>

                </link>

 

 

            </links>

            <zoomscale usegeometry="true" zoompercent="2.0"></zoomscale>

        </layer>

 

Any suggestions would be greatly appreciated.

 

Thanks in Advance!

Tags (1)
0 Kudos
8 Replies
RhettZufelt
MVP Regular Contributor

It appears as if you are using LIKE, but have an exact value.

Try this:

<value prompt="Example: 3216">REPNUMBER like '%[value]%'</value>

RobertScheitlin__GISP
MVP Esteemed Contributor

Also, with the field name containing "NUMBER" is the field an actual numeric type? If so then your expression should look like this instead (no single quotes for numeric values):

<value prompt="Example: 3216">REPNUMBER  = [value]</value>

DanielBurk
New Contributor II

I am also experiencing a similar problem. I am inexperienced with xml and Flex, so any insight into my problem would be appreciated.

 

This is my xml code.

<configuration>
<layers>
<layer>
<token/>
<definitionexpression/>
<enableprintgrid title="Parcels">true</enableprintgrid>
<enableexport>true</enableexport>
<name>Parcel Search</name>
<url>http://maps.duchesne.utah.gov/arcgis/rest/services/ParcelsCIS/MapServer/0</url>
<expressions>
<expression alias="Parcel ID Search" textsearchlabel="Search Parcel ID:" isvaluerequired="true">
<values>
<value prompt="Example: 00-0028-0507">CIS.dbo.TRMaster.Parcel = '[value]'</value>
</values>
</expression>
<expression alias="Serial # Search" textsearchlabel="Search Serial #:">
<values>
<value prompt="Example: 0001 or 4164-0009">CIS.dbo.TRMaster.Serial = '[value]'</value>
</values>
</expression>
<expression alias="Name Search" textsearchlabel="Search Name:">
<values>
<value prompt="Example: Doe John or Doe J or Doe">upper(CIS.dbo.TRMaster.Name) LIKE upper('%[value]%')</value>
</values>
</expression>
<expression alias="Open SQL" textsearchlabel="Search by Typing Full SQL Query:">
<values>
<value prompt="Example: District = '1'">[value]</value>
</values>
</expression>
</expressions>
<graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>
<spatialsearchlayer>false</spatialsearchlayer>
<titlefield>Parcel Search</titlefield>
<fields all="false">
<field name="CIS.dbo.TRMaster.Parcel"/>
<field name="CIS.dbo.TRMaster.Serial"/>
<field name="CIS.dbo.TRMaster.Name"/>
<field name="CIS.dbo.TRMaster.Add1" alias="Mailing Address"/>
<field name="CIS.dbo.TRMaster.Add2" alias="Mailing Address 2"/>
<field name="CIS.dbo.TRMaster.City"/>
<field name="CIS.dbo.TRMaster.State"/>
<field name="CIS.dbo.TRMaster.Zip"/>
<field name="CIS.dbo.TRMaster.Acres"/>
<field name="CIS.dbo.TRMaster.PropertyAddress"/>
<field name="GIS_EDITORS.DBO.Parcels.Market"/>
<field name="GIS_EDITORS.DBO.Parcels.Taxable"/>
<field name="GIS_EDITORS.DBO.Parcels.Land"/>
<field name="GIS_EDITORS.DBO.Parcels.Buildings"/>
<field name="GIS_EDITORS.DBO.Parcels.Taxes_Char"/>
</fields>
<links/>
<zoomscale usegeometry="true" zoompercent="2"/>
<autoopendatagrid>false</autoopendatagrid>
<queryattachments>false</queryattachments>
<relates/>
<symbology>
<simplefillsymbol color="0xff0000" alpha="0.5">
<outline color="0xff0000" alpha="0.8" width="2"/>
</simplefillsymbol>
</symbology>
</layer>
</layers>
<spatialrelationships>
<spatialrelationship>
<name>esriSpatialRelContains</name>
<label>entirely contained in</label>
</spatialrelationship>
<spatialrelationship>
<name>esriSpatialRelIntersects</name>
<label>intersected by</label>
</spatialrelationship>
<spatialrelationship>
<name>esriSpatialRelEnvelopeIntersects</name>
<label>intersected by envelope of</label>
</spatialrelationship>
</spatialrelationships>
<bufferunits>
<bufferunit>
<name>UNIT_FOOT</name>
<label>Feet</label>
</bufferunit>
<bufferunit selected="true">
<name>UNIT_STATUTE_MILE</name>
<label>Miles</label>
</bufferunit>
<bufferunit>
<name>UNIT_METER</name>
<label>Meters</label>
</bufferunit>
<bufferunit>
<name>UNIT_KILOMETER</name>
<label>Kilometers</label>
</bufferunit>
</bufferunits>
<buffervalue>2</buffervalue>
<printdatagrid>
<addheadertoeachpage>true</addheadertoeachpage>
<columnheaderbgcolor>0xa7a7a7</columnheaderbgcolor>
<columnheaderfontcolor>0x000000</columnheaderfontcolor>
<footer>
<pageoftext>Page ## of ##</pageoftext>
<includeprintdate format="MM-DD-YYYY L:NN A">true</includeprintdate>
<disclaimer/>
</footer>
</printdatagrid>
<removeserchlayersminmaxscale>false</removeserchlayersminmaxscale>
<keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>
<autozoomtoresults>true</autozoomtoresults>
<popupsdisabled>false</popupsdisabled>
<enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection>
<tolerancebydefault>false</tolerancebydefault>
<spatialreference>102100</spatialreference>
<zoomscale>2400</zoomscale>
<csvseparator>,</csvseparator>
<textqualifier>"</textqualifier>
<disablebuttons/>
<defaultselectionoption>textInput</defaultselectionoption>
<enabledrawgraphicbutton>true</enabledrawgraphicbutton>
<enablebuffergraphicbutton>true</enablebuffergraphicbutton>
<enablelocategraphicbutton>true</enablelocategraphicbutton>
<enablemultigraphicssearch>false</enablemultigraphicssearch>
<enableincludetextsearch>false</enableincludetextsearch>
<enableaddtollerance>true</enableaddtollerance>
<enablegraphicsbuffering>true</enablegraphicsbuffering>
<selectedgraphicaltool/>
<multipartgraphicsearch>false</multipartgraphicsearch>
<floatorfixed>fixed</floatorfixed>
<relatetooltip>Show Relates</relatetooltip>
<relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
<subselection color="0xfbfe0a" linewidth="4" alpha="0.8"/>
<keepbufferaftersearch>false</keepbufferaftersearch>
<labels>
<urlsearcherrormessage>URL search parameters are incorrect</urlsearcherrormessage>
<includetextquery>include text query in selection criteria</includetextquery>
<includetextquerywarn>Must be the same search layer in both
graphical and text search pages.</includetextquerywarn>
<buffergrapicprops>Buffer graphic properties</buffergrapicprops>
<bufferusergraphics>Buffer Graphic</bufferusergraphics>
<norelatesfound>No related features found for:</norelatesfound>
<norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>
<addtolerance>Add search tolerance to point selection</addtolerance>
<existingdrawgraphicslabel>Use Existing Enhanced Draw Widget Graphics</existingdrawgraphicslabel>
<existinglocategraphicslabel>Use Existing Enhanced Locate Widget Graphics</existinglocategraphicslabel>
<existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>
<graphicalsearchlabel>Graphical Search</graphicalsearchlabel>
<textsearchlabel>Text Search</textsearchlabel>
<resultslabel>Results</resultslabel>
<layerlabel>Search Layer:</layerlabel>
<layerfieldlabel>Search Layer Field:</layerfieldlabel>
<nolayerlabel>No search layer defined.</nolayerlabel>
<submitlabel>Search</submitlabel>
<pointlabel>Select by Point</pointlabel>
<linelabel>Select by Line</linelabel>
<rectanglelabel>Select by Rectangle</rectanglelabel>
<polygonlabel>Select by Polygon</polygonlabel>
<clearlabel>Clear</clearlabel>
<loadinglabel>Loading...</loadinglabel>
<selectionlabel>Features Selected:</selectionlabel>
<gridresultslabel>Show Results in Grid</gridresultslabel>
<csvdefaultname>Selected Records</csvdefaultname>
<relatescsvdefaultname>Related Records</relatescsvdefaultname>
<exportbtnlabel>Export...</exportbtnlabel>
<export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
<export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
<bufferlabel>apply a search distance:</bufferlabel>
<spatialsearchlabel>Spatial search</spatialsearchlabel>
<applybufferlabel>Apply buffer</applybufferlabel>
<searchlayerlabel>Search entities of:</searchlayerlabel>
<enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>
<zoomalllabel>Zoom</zoomalllabel>
<zoomalltip>Zoom to all results</zoomalltip>
<bufferalpha>Fill opacity</bufferalpha>
<buffercolor>Fill color</buffercolor>
<nobuffercolor>No fill color</nobuffercolor>
<bufferoutlinecolor>Outline color</bufferoutlinecolor>
<nobufferoutlinecolor>No outline color</nobufferoutlinecolor>
<bufferoutlinewidth>Outline Width</bufferoutlinewidth>
<configbuffergra>Configure buffer graphic properties...</configbuffergra>
<required>*</required>
<requiredtooltip>This field is required.
Enter a value to enable search button</requiredtooltip>
<selectmethodtip>Click to change the selection method</selectmethodtip>
<newselectionmethodtip>Create new selection</newselectionmethodtip>
<addselectionmethodtip>Add to current selection</addselectionmethodtip>
<removeselectionmethodtip>Remove from current selection</removeselectionmethodtip>
<pagingqueryerrormsg>Four unsuccessful attempts was made to get unique values for</pagingqueryerrormsg>
<intersectmessage>There is no result to intersect, please make a graphical or text search first.</intersectmessage>
<edrawgraphicsmessage>There are no graphics available</edrawgraphicsmessage>
<nodatagridmessage>No Datagrid configured for this layer</nodatagridmessage>
<buffermessage>There is no result to buffer, please make a graphical or text search first.</buffermessage>
<clearbufferlabel>Clear Buffer</clearbufferlabel>
<alloptiontext>all</alloptiontext>
<spatialchoicemsg>Do you want to use the Buffer Graphics or the Selection Graphics?</spatialchoicemsg>
<spatialchoicetitle>Choose</spatialchoicetitle>
<buffergraphicstext>Buffer Graphics</buffergraphicstext>
<selectiongraphicstext>Selection Graphics</selectiongraphicstext>
</labels>
<symbols>
<simplefillsymbol color="0x00ffff" alpha="0.5">
<outline color="0xff0000" alpha="0.8" width="2"/>
</simplefillsymbol>
<picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0"/>
<simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>
</symbols>
</configuration>

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Daniel,

   None of your fields or expressions should have "CIS.dbo." in front of them.

DanielBurk
New Contributor II

I tried eliminating "CIS.dbo" as well as "TRMaster" with no change either way. I believe those prefixes are there because the fields are populated from a joined table.

0 Kudos
RhettZufelt
MVP Regular Contributor

Daniel,

It is related to the field names not needing the extra .DBO stuff in front of it.

First, I stripped that from your value statement and it still got error.  then, I set <fields all='true'> so that it would see the fields available, and that worked.

Setting back to the way you had it, you have "<field name="GIS_EDITORS.DBO.Parcels.Market"/>", however, the service has a CIS appended to Parcels (<field name="GIS_EDITORS.DBO.ParcelsCIS.Market"/>), plus, when looking at the 5 fields you are pulling from GIS_EDITORS.DBO..... do NOT show in the service itself.

So, commented out the fields that don't exist and this seems to be working now (though, I only tested the first Parcel search).

I didn't change anything below the <fields> tag.

Always a good idea to load the mapservice into the browser to see the name/format of the fields available in the service itself.

R_

<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->
<configuration>
<layers>
<layer>
<token/>
<definitionexpression/>
<enableprintgrid title="Parcels">true</enableprintgrid>
<enableexport>true</enableexport>
<name>Parcel Search</name>
<url>http://maps.duchesne.utah.gov/arcgis/rest/services/ParcelsCIS/MapServer/0</url>
<expressions>
<expression alias="Parcel ID Search" textsearchlabel="Search Parcel ID:" isvaluerequired="true">
<values>
<value prompt="Example: 00-0028-0507">TRMaster.Parcel = '[value]'</value>
</values>
</expression>
<expression alias="Serial # Search" textsearchlabel="Search Serial #:">
<values>
<value prompt="Example: 0001 or 4164-0009">TRMaster.Serial = '[value]'</value>
</values>
</expression>
<expression alias="Name Search" textsearchlabel="Search Name:">
<values>
<value prompt="Example: Doe John or Doe J or Doe">upper(TRMaster.Name) LIKE upper('%[value]%')</value>
</values>
</expression>
<expression alias="Open SQL" textsearchlabel="Search by Typing Full SQL Query:">
<values>
<value prompt="Example: District = '1'">[value]</value>
</values>
</expression>
</expressions>
<graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>
<spatialsearchlayer>false</spatialsearchlayer>
<titlefield>Parcel Search</titlefield>
<fields all="false">
     <field name="TRMaster.Parcel"/>
     <field name="TRMaster.Serial"/>
     <field name="TRMaster.Name"/>
     <field name="TRMaster.Add1" alias="Mailing Address"/>
     <field name="TRMaster.Add2" alias="Mailing Address 2"/>
     <field name="TRMaster.City"/>
     <field name="TRMaster.State"/>
     <field name="TRMaster.Zip"/>
     <field name="TRMaster.Acres"/>
     <field name="TRMaster.PropertyAddress"/>
<!--      <field name="GIS_EDITORS.DBO.ParcelsCIS.Market"/> -->
<!--      <field name="GIS_EDITORS.DBO.ParcelsCIS.Taxable"/> -->
<!--     <field name="GIS_EDITORS.DBO.ParcelsCIS.Land"/> -->
<!--      <field name="GIS_EDITORS.DBO.ParcelsCIS.Buildings"/> -->
<!--      <field name="GIS_EDITORS.DBO.ParcelsCIS.Taxes_Char"/> -->
</fields>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
DanielBurk
New Contributor II

Hmmm...

I made those suggested changes, but am still getting the same error.

0 Kudos
RhettZufelt
MVP Regular Contributor

Not sure what to tell you, is still working fine for me.

Maybe try stripping it down until you get just the one search working.

This code is only the parcel search, and I removed the field mapping and set to fields all="true", so you should get ALL fields returned.  Once you get it working, you can go back in and restrict it.

Also, what is the error that you are getting?  That might help with this.

<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->
<configuration>
<layers>
<layer>
<token/>
<definitionexpression/>
<enableprintgrid title="Parcels">true</enableprintgrid>
<enableexport>true</enableexport>
<name>Parcel Search</name>
<url>http://maps.duchesne.utah.gov/arcgis/rest/services/ParcelsCIS/MapServer/0</url>
<expressions>
<expression alias="Parcel ID Search" textsearchlabel="Search Parcel ID:" isvaluerequired="true">
<values>
<value prompt="Example: 00-0028-0507">TRMaster.Parcel = '[value]'</value>
</values>
</expression>
</expressions>
<graphicalsearchlabel>Use one of the graphical search tools to select a Parcel</graphicalsearchlabel>
<spatialsearchlayer>false</spatialsearchlayer>
<titlefield>Parcel Search</titlefield>
<fields all="true">
</fields>

<links/>