Select to view content in your preferred language

eSearch Widget not working for Flex 2.4

2545
10
08-25-2011 08:47 AM
HarrietMcQuade
Emerging Contributor
Hi there,

I have recently downloaded flex viewer 2.4, and am trying to use the advanced search widget (eSearch), and it is not working. The icon appears in my web application but once clicked nothing actually happens, I don't even get an error? It worked for a collegue in 2.1 but not for me. Below is my config, can anyone help?

Harriet

<configuration>
<layers>
  <layer>
   <definitionexpression></definitionexpression>
   <enableexport>true</enableexport>
            <name>Address Search</name>
            <url>http://baltimore/ArcGIS/rest/services/ATLAS_Contact/Contact_Dynamic/MapServer/2</url>
            <expressions>
             <expression alias="Address Search" textsearchlabel="Enter Any part of Address [ Example: 5 Victor Drive ]:">ADDRESS LIKE ('%[value]%')</expression>
             <expression alias="UPRN Search" textsearchlabel="Enter UPRN [ Example: 010012150891 ]:">UPRN LIKE ('[value]%')</expression>

   </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select a property</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>UPRN</titlefield>
            <linkfield linkprefix="" linksuffix=""></linkfield>
   <icon isfield="true" iconprefix="" iconsuffix=""></icon>
            <fields all="false">
    <field name="UPRN" gridfield="true"/>
    <field name="ADDRESS" gridfield="true"/>
    <field name="BLPU_CLASS_DESC" gridfield="true"/>
   </fields>
            <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>
<tolerance>6</tolerance>
<spatialReference>102003</spatialReference>
<zoomscale>2400</zoomscale>
<geometryservice>http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<csvSeparator>,</csvSeparator>
<toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
<disablebuttons></disablebuttons><!--possible values one or more not all three search types comma sepearted text,graphic,spatial,grid -->
<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>false</multipartgraphicsearch>
<labels>
  <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>
  <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>
</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>
Tags (2)
0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Harriet,

   Your expression for your layer is not proper SQL syntax:

ADDRESS LIKE ('%[value]%')


should be:

upper(ADDRESS) LIKE upper('%[value]%')
0 Kudos
HarrietMcQuade
Emerging Contributor
Hi, Thanks Richard.

I changed the syntax as per your response, but i dont think the syntax is the problem. My collegue has used the exact same config as i did, but in the 2.1 viewer and it works perfectly. I am not even getting the widget to open at the moment. On click nothing happens, it wont let me go as far to begin a search. I dont even get an error?
0 Kudos
MLowry
by
Frequent Contributor
You sure you copied over the whole eSearch widget folder that included the .xml, .swf, and assets folder right? Post you config.xml where you specify the widget as well.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Harriet,

  If you should probably review all the "How to install:" instructions in the ReadMe.txt.
0 Kudos
MarkHorsell
Emerging Contributor
Have you added it to Properties>Flex Modules ?
0 Kudos
HarrietMcQuade
Emerging Contributor
Hi Again!

I copied over the entire folder exactly. I have tried typing it all again manually too, and still will not work.

Mark, how do i get to the flex modules?

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Harriet,

   That is discussed step by step in the ReadMe.txt under Finalize the install for Uncompiled version.
0 Kudos
MarkHorsell
Emerging Contributor
Hi,
Its actually very simple. Just right click on properties,then click flex modules and click add, then navigate to the widget you want compiled into your project.
0 Kudos
HarrietMcQuade
Emerging Contributor
Hi,

Thanks, but I am using the compiled version, not the uncomplied. I have made do with the out of the box search widget for now, so that the website can go live. I really would like to use the eSearch, has it worked for people using 2.4 do you know? The widget jumps as if it is going to open then nothing happens. I use firebug with Firefox, and that shows that nothing is happening either?
0 Kudos