Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

113200
552
04-19-2012 08:03 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the next release of my eSearch Widget.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Version 2.5.1.7 - 4/19/2012
* Added ability to search (flat/standalone/no geometry) tables.
* This time all Zooming uses the same scaling (popup, datagrid, widget results, zoom to all).
* Added Relates icon/button to datagrids so that you can click on it in the datagrid to
  open relates choice dialog.
* Move all skins to a skins package for cleaner organization.
* Links that are not associated with a field now work.
* Ability to disable the relates tab in the fixed widget is now configurable.
552 Replies
RhettZufelt
MVP Notable Contributor
Rhett,

   This confusion is why I was hesitant about adding the "all" to the unique value list when you asked for it. So what I ended up doing is when I see the all chosen in the unique value dropdown I just do a 1=1 query (basically giving you everything as that is what all unique values would be).


I see that you are adding "all" to the list, but the query is sending "allu" and when it sees "allu" it sends "1=1".  Couldn't one just modify the "all" to something like "all values" and the query to "__allvals__" (or something that will probably never be in the data like "allu" ;o), that way, if the value of "all" is in the data, the pagingquery will find it and add it to the list but you could always select the "all values" option also.

As far as the uniquevalsfromfield adding a blank I had this fixed at one point them made some more code changes to account for a possible empty string value being in the data and I broke it again. But I now have it fixed again. Please re-download the widget.


So, did you have to un-do this "fix" to get it working correctly as I see we can not search for empty strings (or spaces or nulls) as a value using the uniquevals or userlist options. (uniquevalsfromfields no longer captures the NULL values)

BTW Version 3.0.14f is now available with the fix for the first query layer having multiple uniquevalsfromfields


Yep, seems to be working fine. 

However, in this version if one clicks on the Clear button before a search, it throws a null values error (at least with debugger flashplayer).  If ANY search has been performed, even if cleared, then you can hit the clear button all you want without the error.

also, it appears that if you only have one search layer (either layer(s) or table(s)), you do not get the new "add to selection", "remove from", etc. options.


R_
0 Kudos
SamanthaEdwards
Deactivated User
I am having a problem with the widget configuration automatically loading. The widget adds fine but the configuration is empty, thus leaving me with the message: no search layer defined.  I've gone through all the pdfs but I'm obviously missing something. Any suggestions?

Thanks,
S
0 Kudos
RhettZufelt
MVP Notable Contributor
Are you trying to search a table without loading a layer also?  I see the latest version has some errors if there are no layers defined.

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
That is because searching tables was always designed as a add on ability and not a standalone ability. Simply put the way I have the widget designed you can not have all tables and no layers as it stands right now (been that way since I introduced tables in the widget).
0 Kudos
RhettZufelt
MVP Notable Contributor
Makes sense, though I had not tried it before to know if it was always this way.

I was just trying to find ways to re-produce this error. This was one of them (most common seemed to be my syntax of the layer name/fields :o).

R_
0 Kudos
RhettZufelt
MVP Notable Contributor
Really like the add/remove to/from selection option.  A handy feature.

I did notice that if you switch to a different layer/table, then the selection is cleared. 
Don't even know if it is possible without a huge re-write, but a nifty "enhancement" would be to allow it to add to the selection regardless of which layer/table it is from (I.e., don't clear the selection on layerChanged).

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   That could be useful but it definitely would involve a major re-write as each layer has different fields that are returned and thus a different datagrid is necessary and handling the multiple selections when allowing for the spatial search would be a nightmare.
0 Kudos
EvanSepa1
Deactivated User
When my search results populates the bottom table and fields contain blanks, the auto width makes these fields unnecessarily large.

Is there a way to configure the way the auto width controls blank fields? Setting the width to that of the header would be ideal.

See attached pic. 

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Evan,

   So all the rows have empty strings returned for those columns? The auto size columns code uses the column header if it can not find any data in the columns attributes...
0 Kudos
EvanSepa1
Deactivated User
My Mistake, it was a simple coding error . . . my field names were incorrectly included as "Middle_Name" instead of "Middle_Nam"

Thanks for your quick response . . . I have another question . . .

In the installation instructions you indicated to

- Add the following lines to the DrawWidget.mxml in the init function under this line 'graphicsLayer = new GraphicsLayer();'
graphicsLayer.name = "Draw Features";
graphicsLayer.id = "Draw Features";

In the regular Draw Widget folder the DrawWidget.xml only contains the following . . . Am I completely in the wrong place is this not where you intended?

<?xml version="1.0"?>
<configuration label="Draw and measure (default)">
    <distanceunits>
        <distanceunit id="km"/>
        <distanceunit id="mi"/>
        <distanceunit id="m"/>
        <distanceunit id="ft"/>
        <distanceunit id="yd"/>
    </distanceunits>
    <areaunits>
        <areaunit id="sq km"/>
        <areaunit id="sq mi"/>
        <areaunit id="ac"/>
        <areaunit id="ha"/>
        <areaunit id="sq m"/>
        <areaunit id="sq ft"/>
        <areaunit id="sq yd"/>
    </areaunits>
</configuration>
0 Kudos