Select to view content in your preferred language

Selection Widget Updated Version

43941
146
05-12-2011 05:24 AM
MarkHoyland
Occasional Contributor II
The Selection widget has a "Select by Attributes" and "Select by Location" option similar to ArcGIS.
Widget link: http://www.arcgis.com/home/item.html?id=20ed6af9ab204548bbf092d51b51fef8

Version 1.5 of the widget replaces version 1.0

Enhancements and fixes include:
*Each time a query layer was added it was also being added to the TOC. This has been fixed.

*When resizing the widget, the datgrid would not resize properly. This has been fixed.

*Uses paging for selection of unique value list. This means that ALL values will be parsed regardless of the ArcGISServer setting to limit responses. There is an option to ESC out of a large query. (This is only for the Unique list, not getting features).
I have included an ESRI TaxParcel Layer that has 18,000+ records. Get Unique Values on the PSTLSTATE field to see this in action.
Available on my example site. The URL is on the Widget download page.

*Aliases can now be used. It will now use the Alias as set in the Featureclass. You can also override the Alias in the SelectionWidget.xml config file.

*ArcGis layers that have joined tables will now work with fully qualified field names. (thanks Dasa for the idea)

*Styling for selection colours has been documented in the SelectionWidget.xml config file (example provided).

*Styling for datagrid has been changed. It can now also be styled in SelectionWidget.xml config file (example provided). (thanks Mehul for the idea)

*Changed initial uniquevalue query to use "text='%'" instead of "where '1=1'" for Mike.:)

*You can now override scale range for layers.

*Link field now has a prefix/suffix option in the SelectionWidget.xml config file (naming convention the same as Robert SCheitlin's esearch widget)

*Shape_area and Shape_length can be used in the fields.

Link to previous thread :http://forums.arcgis.com/threads/24151-Selection-Widget-for-SFV2.2-(with-a-query-builder)
Tags (2)
0 Kudos
146 Replies
CarolineCochrane
New Contributor III
Harold and Ashlee - thank you both so much for your advice!

I have checked the layer's primary field is of type string. I have tested on a string field and also made the change: query.where = "1=1"; as per your kind advice, Harold, but the unique values are still not being returned unfortunately.
The links to the later versions of the widget are all compiled and as my viewer is customised quite a bit - i require a uncompiled version, do you know off hand if one is out there?

Kind regards and again thank you both for your help with this wee issue! 🙂

Caroline
0 Kudos
heatherGrybas
New Contributor
Hi again. I had posted earlier about the selection widget not bringing up the date and time together in the unique values field. You compiled a new version that fixed that but I seem to be facing another problem and I'm not sure if it's the widget or my own settings. I mentioned before that geodatabases store date and time together in a date field. The ArcGIS help menu says that date are stored as yyyy-mm-dd hh:mm:ss AM or PM. The time doesn't matter to me since the geodatabase seems to store random times that make very little sense. When I open up the selection widget and go to search by a specific date the widget brings up all the unique values but then fails to find any features. When I inspected how the dates were stored in the attributes and how the appear in the widget I noticed they were shown in two different formats. I'm not sure if this is the reason for why it can't bring up the results. I had it working fine with the same data yesterday. I attached some pics of the dates in the attribute field and the widget. I don't have the ability to change code unfortunately. If anyone has any ideas I'd appreciate the help 🙂

Thanks!
0 Kudos
KeithGerhartz1
Occasional Contributor II
Mark,

I read that the unique values list does not populate if the underlying table does not have an object ID field. This presents an issue relative to using the widget to query mapservice layers that were created as event themes. Any possibility of a modification to overcome this issue?

Thanks you.

Keith
0 Kudos
ChristopherGray
New Contributor
Hello,

Does anyone know if there is a record limit when finding the unique values?  When I click on Get unique values it just says Processing 0 of 0 records and then it ends.  If I use a smaller subset of the same data it works fine.

Any help would be appreciated.

Chris
0 Kudos
MattGiles
New Contributor
Just wondering if anybody else is having this issue...

When there are more than 1 query results the widget works flawlessly..
When there is only 1 query result, the pin icon for the selected feature disappears, my map scale goes into the negatives, and all features in all layers disappear...its as if im on the other side of the basemap lol.., also the info popup for the selected feature moves around the map as i zoom....
0 Kudos
MattGiles
New Contributor
I have figured out the problem..in case anybody else is experiencing this issue:

In selectionWidgetUtil.as there are two functions (getGraphicsExtent() and zoomToSelectedFeatures()). Inside each of these functions there is a block of code that deals with creating a new extent around a single point, to allow zoom to selected features when only one point is selected. Inside these code blocks, a new extent is created (called result or graphicsextent).

When the new extent is created, the original code read : [graphicsExtent = new Extent(myPoint.x + 50000, myPoint.y + 50000,myPoint.x - 50000, myPoint.y - 50000, null);] where myPoint is the selected feature. However, when a new extent is created, the proper syntax is: [ new Extent(xmin, ymin, xmax, ymax, spatialReference)] NOT [new Extent(xmax, ymax, xmin, ymin, spatialReference)].

I simply changed the code to read : [graphicsExtent = new Extent(myPoint.x - 50000, myPoint.y - 50000,myPoint.x + 50000, myPoint.y + 50000, null);] and the problem is solved!
0 Kudos
DianeWhited
New Contributor
Burns86 - I think I am experiencing the same problem.  I have data the covers the international dateline and when the selection finds data on both sides of the dateline - it zooms way out to cover the whole globe. Do you believe your solution would work for me?

If so - I don't have the uncomplied version, just .swf and .xml for flex 2.4.  Could you send me complied version or uncompilied data for 2.4?

Thanks.
0 Kudos
MarcinMielewczyk
New Contributor
That's right this wdiget is w*ak*d. you are great.

I am experiencing small problem with this widget, namely, when it is in Selection Results tab and I click on one of the results - my flesh crashes.it might be because my FW 2.5 is a bit customized comparing to the original one  - I hoped that I could fix it on my own but I can not find source code. So, I was wandering if you could put on the forum uncompiled version of you widget for FW2.5?

Thanks,
Marcin
0 Kudos
MattPohl
Occasional Contributor II
Hello all-

First off, great widget, it works great and we use it all the time. Just wondering if anyone has modified it to include the ability to select from the current selection? Is this even a possibility? I have received many request for this function and agree that it would add to the power of this widget. Any insight would be appreciated.
0 Kudos
MarcinMielewczyk
New Contributor
Hi all,

Each time, when I use the widget I am impressed. I would like to repeat our colleague request, namely:I'd like to see the Unique Values list use the coded domain values (like the info popup).
Would it be possible?

And another thing: is it possible to put on the forum uncompiled version of the widget for FV2.5?

Best regards,
Marcin.
0 Kudos