Select to view content in your preferred language

Error #1009 - Robert's Enhanced Search Widget

2791
6
Jump to solution
02-23-2012 02:24 AM
ArgoonChuang
Occasional Contributor
Hi Robert,

I am trying your eSearch widget (thanks!) and got the #1009 error as the result. It's the latest version 2.5.1.4, and I tried both the compiled and uncompiled ones, same result. I've read other similar questions but seems they all not fit my case.

The key thing is I query the same map services with your previous widget, 2.4.0.12, with the same configuration xml and everything goes well as it should be. So seems the shapefield not revealed in the service doesn't hit my case. AlsoI tried to republish the mapservices as well but no help. Attached is the xml I used. Hope you can bring me some light. Thanks in advance.

Best,
AG
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
All,

  I appoligize about the bad release... I have it now fixed and you can now download Version 2.5.1.4f.

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
AG,

   I am not 100% sure but try adding the links section as below. That is the only thing I see missing in your config.

<?xml version="1.0" ?>
<!-- See Enhanced Search Widget XML Configuration.pdf for detailed explanation -->

<configuration>
    <layers>
        <layer>
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <name>Boreholes</name>
            <url>http://hkgnts82/AGIS/rest/services/GISDB/Borehole/MapServer/1</url>
            <expressions>
                <expression alias="Borehole ID" textsearchlabel="Search Borehole ID [ Example: 27807 ]:">
                    upper(BH_ID) LIKE upper('%[value]%')
                </expression>
                <expression alias="Project Source" textsearchlabel="Search Zoning Code [ Example: KTE ]:" userlist="KTEr,SILw" >
                    upper(Proj) = upper('[value]')
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Boreholes : </graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>BH_ID</titlefield>
            <fields all="true" />
            <links>
                <link includeinresults="false" field="" alias="">
                    <linkprefix></linkprefix>
                    <linksuffix></linksuffix>
                    <iconfield></iconfield>
                    <iconprefix></iconprefix>
                    <iconsuffix></iconsuffix>
                </link>
            </links>
            <zoomscale usegeometry="false">5000</zoomscale>
        </layer>
    </layers>
    <spatialrelationships>
        <!-- possible spatial relationships esriSpatialRelIntersects | esriSpatialRelContains 
            | esriSpatialRelCrosses | esriSpatialRelEnvelopeIntersects | esriSpatialRelIndexIntersects 
            | esriSpatialRelOverlaps | esriSpatialRelTouches | esriSpatialRelWithin currently 
            unavailable: esriSpatialRelRelation -->
        <spatialrelationship>
            <name>esriSpatialRelContains</name>
            <label>entirely contained in</label>
        </spatialrelationship>
        <spatialrelationship>
            <name>esriSpatialRelIntersects</name>
            <label>interssected by</label>
        </spatialrelationship>
        <spatialrelationship>
            <name>esriSpatialRelEnvelopeIntersects</name>
            <label>intersected by envelop of</label>
        </spatialrelationship>
    </spatialrelationships>
    <bufferunits>
        <bufferunit>
            <name>UNIT_FOOT</name>
            <label>Feet</label>
        </bufferunit>
        <bufferunit>
            <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>
    <enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
    <toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
    <tolerancebydefault>false</tolerancebydefault>
    <spatialreference>102003</spatialreference>
    <zoomscale>2400</zoomscale>
    <geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
    <csvseparator>,</csvseparator>
    <disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,grid,datagrid -->
    <defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
    <enabledrawgraphicbutton>true</enabledrawgraphicbutton>
    <enablebuffergraphicbutton>true</enablebuffergraphicbutton>
    <selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
    <multipartgraphicsearch>true</multipartgraphicsearch>
    <floatorfixed>float</floatorfixed><!-- possible values are fixed and float -->
    <relatetooltip>Show Relates</relatetooltip>
    <relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
    <labels>
        <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 eDraw Widget Graphics</existingdrawgraphicslabel>
        <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>Adjust buffer alpha</bufferalpha>
        <buffercolor>Select buffer color</buffercolor>
    </labels>
    <symbols>
        <simplefillsymbol color="0xff0000" alpha="0.5">
            <outline color="0xff0000" alpha="0.8" width="2" />
        </simplefillsymbol>
        <!-- You can have one or the other, either simplemarkersymbol or picturemarkersymbol 
            defined for your point results NOT BOTH. picturemarkersymbol will override 
            simplemarkersymbol if you do not have it commented out. -->
        <!--<simplemarkersymbol style="square" size="12" color="0xff0000" alpha="0.5" 
            xoffset="0" yoffset="0" angle="0"> <outline style="solid" color="0x000000" 
            alpha="1" width="1"/> </simplemarkersymbol> -->
        <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>


Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
JasonNielsen
Regular Contributor
Hi Robert,

I am trying your eSearch widget (thanks!) and got the #1009 error as the result. It's the latest version 2.5.1.4, and I tried both the compiled and uncompiled ones, same result. I've read other similar questions but seems they all not fit my case.

The key thing is I query the same map services with your previous widget, 2.4.0.12, with the same configuration xml and everything goes well as it should be. So seems the shapefield not revealed in the service doesn't hit my case. AlsoI tried to republish the mapservices as well but no help. Attached is the xml I used. Hope you can bring me some light. Thanks in advance.

Best,
AG


I think i found the issue. Yesterday, Robert when you modified it for me to have different icons for the Relates it caused the 1009 error. If you have a layer in your SearchWidget.xml without the relate coding for it you get a 1009 error. If you add in the following to each layer in your search you can get the 1009 error to go away and the search to work but you get the default symbol displayed in the searchresults and that layer doesn't really have a relate. 

If you add the code below to each layer in your searchwidget.xml you can get the searching working again on them.
   <relates>
    <relate>

    </relate>
   </relates>


To hide the relate icon I just replaced the default �?�i_relate.png�?� to be a transparent PNG file the same size and it doesn�??t show an icon unless you specify it in the Relate coding.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hang tight guys I will get that fixed.
0 Kudos
BillSpiking__GISP
Frequent Contributor
Hey Robert,

I was getting the same error with version 2.5.1.4, so I went back to using 2.5.1.3 and everything seems to be working fine now.

Thank you,

Bill
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

  I appoligize about the bad release... I have it now fixed and you can now download Version 2.5.1.4f.
0 Kudos
ArgoonChuang
Occasional Contributor
Robert,

The widget works perfect now. Thanks so much!

Cheers,
Argoon
0 Kudos