Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

110214
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
EricVenden
Frequent Contributor
No problem Robert - I've taken enough of your time.  ...it's a head scratcher.  I have 4 other searches that work fine.

If I stumble on something that fixes it, I'll let you know.
Thank you
Eric
0 Kudos
TonyBlades
Emerging Contributor
Robert, Eric,
   I'm having the same issue.  I have other searches working but in this case what I think my problem is is that not all of the records have a spatial reference to the layer.  Could that be it?

tb
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tony,

   Can you elaborate on that?
I think my problem is is that not all of the records have a spatial reference to the layer
Are you saying that a particular feature class in your map document is unprojected and has no spatial reference?
0 Kudos
TonyBlades
Emerging Contributor
Robert,
    I have a layer with 5 maintenance area polygons, symbolized by cost center.  When I found out I couldn't make a 1-M join work, I added my 40 maintenance employees to the maintenance area table and assigned each of them to one of the cost centers.  Now when I search by cost center I get the 1009 error on the search box but on the grid table each of the employees in that cost center show up with their coorisponding field data.
    In my map document when I select one of the employees, the area he's assigned to is not selected.  My original 5 records defining the maintenance areas are still in the table and when those records are selected, of course the polygon is also selected.

tb
0 Kudos
MelissaJohnson
Frequent Contributor
Eric,

This is a shot in the dark, but it may be the issue you are having.  I too could not get my results to pull up and I found that it was because the search was case sensitive.  The data in my underlying table was all caps.  The fix was to use upper (for example):

<expression alias="Owner Name" textsearchlabel="Search By Owner Name...(Last Name, First Name)" field="OwnerName1" usedomain="true">upper(OwnerName1) LIKE upper('[value]%')</expression>

May not be the solution but worth a shot.
Melissa
0 Kudos
IsaiahAguilera
Frequent Contributor
Robert,

This may seem rather elementary but I am using your search widget and it works great. I noticed in your conversation with Eric that he is able to search using "like" words. As of now all of my searches must match the field exactly to return results. Doing this may go beyond the spectrum of this widget but how would I able to search and get results without having to match whats in the field exactly.

e.g. Search "Civic" And Results Give Me "Civic Center Dr"
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Isaiah,

In the zip you have a SearchWidget.xml file that contains an example of this:

   <expressions>
    <expression alias="Traffic Camera Description" textsearchlabel="Search Traffic Cameras by Location... [ Example: I-71 ]">upper(DESCRIPTION) LIKE upper('[value]%')</expression>
   </expressions>
0 Kudos
IsaiahAguilera
Frequent Contributor
Robert,

Thank you, I must have deleted that before reading it. Works great. Thank you for all your help.
0 Kudos
EricVenden
Frequent Contributor
Thanks for the idea Melissa,

I tried it and the search still errors out on the initial results window.  The grid shows the proper results.

Eric V
Gurnee, IL
0 Kudos
GeraldLee__GISP
Frequent Contributor
Eric,
I was having the same problems with the query widget (error code #1009). i read an earlier answer from Robert S explaining the need to have at least the OBJECTID and shape field checked visible, when you publish your MXD (or MSD). when i did that and republished, all was fixed. dont know if this is the answer for you but its worth a shot anyway..
Gerald
0 Kudos