Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

158183
767
10-25-2010 02:13 PM
RobertScheitlin__GISP
MVP Emeritus
All Here is my next widget in the FlexViewer 2.1 series

Special thanks to Erwan Caradec for contributing to this code.

The Enhanced Search Widget extends the standard search widget with a floating data grid and a new spatial query w/buffering.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Tags (2)
0 Kudos
767 Replies
RobertScheitlin__GISP
MVP Emeritus
David,

   The enhanced search widget displays results in the widget results, the info popup and a floating data grid if you configure it for that. So the gridfield only attribute says don't display it in the info popup or widget results, only the floating data grid.
0 Kudos
DavidAllen
Frequent Contributor
David,

   The enhanced search widget displays results in the widget results, the info popup and a floating data grid if you configure it for that. So the gridfield only attribute says don't display it in the info popup or widget results, only the floating data grid.



That certainly makes sense. I haven't configured everything so I haven't seen the data grid yet.

What about sorting the results, though?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   There is a reason you do not see any examples of esri or anyone else doing this in their code. The reason is that Adobe does not guarantee the order of objects in an ArrayCollection as you parse thought the results. So as the results of the search widgets uses an array collection there is no guarantee to the order of the results. You can sort the results but it has to be done in code.
0 Kudos
EricVenden
Frequent Contributor
Looking for some help on the eSearch widget 2.2.4 in Flex Viewer 2.2.

I am getting a #1009 error when running a particular search.  If I click on the Data Grid icon, I get the proper results in that window.  It is a simple query on a layer that does not contain joins.  Here's the SQL:  SUB_NAME LIKE '%[value]%'   The query must be running properly as the results in the Data Grid are correct...

Any ideas?
Thanks
Eric Venden
GIS Coordinator
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   You need to post your SearchWidget.xml as error 1009 is a very generic error you get when something is null, so that information is not much use in diagnosing the issue.
0 Kudos
EricVenden
Frequent Contributor
Thanks Richard,

Here's the info in the layer tag:

        <layer>
            <name>Subdivisions by Name</name>
            <url>http://arcgis-srv1.village.gurnee.il.us/ArcGIS/rest/services/Subdivisions/MapServer/1</url>
            <expressions>
    <expression alias="SubdivisionSearchByName" textsearchlabel="Search by Name [ Example: Southridge ]:">SUB_NAME LIKE '%[value]%'</expression>
            </expressions>
   <graphicalsearchlabel>Use one of the graphical search tools to select Subdivisions</graphicalsearchlabel>
   <spatialrelationlayer>true</spatialrelationlayer>  
            <titlefield>SUB_NAME</titlefield>
            <linkfield linkprefix="" linksuffix=""></linkfield>
   <icon isfield="true" iconprefix="" iconsuffix=""></icon>
            <fields all="false">
    <field name="SUB_NAME" alias="Subdivision Name" gridfield="true"/>
    <field name="SUB_PHASE" alias="Phase" gridfield="true"/>
    <field name="SUB_UNIT" alias="Unit" gridfield="true"/>
    <field name="DOC_NUM" alias="Doc Number" gridfield="true"/>
    <field name="PLAT_PDF" alias="Subdivision Plat PDF" gridfield="true"/>
    <field name="OBJECTID" alias="ObjectID" gridfield="true"/>
            </fields>
   <zoomscale>1200</zoomscale>
        </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   I have been studying your xml and don't see any issue so what I would do is remove all the other fields from the fields list except SUB_NAME and see if that eliminates the error. If it does add the fields back one by one to try and narrow down what the issue is.
0 Kudos
DavidAllen
Frequent Contributor
Is there a search sensitivity for the Graphic Selection "Select by Point" or "Select by Line"? I've got the rectangle and polygon selections working great, but even if I zoom way in I can't get the point or line to select anything.
0 Kudos
JimWelsh
Deactivated User
Robert,

As always, your work is fantastic.  Quick question...

What is the easiest way to disable specific search types?  i.e. disable the text search function

Thank you.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   Nope no tolerance setting for them. As you can see on my preview site there isn't an issue with point or line selection. http://gis.calhouncounty.org/IdentExample/index.html?config=config-eSearch.xml

Are you trying to select points using point or line? if so you are HIGHLY unlikely to click in the precise location to get a result.
0 Kudos