Selection Widget Updated Version

41706
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
HaroldBostic
Occasional Contributor II
Does anyone have a compiled fix for the date issue?  it is showing some long number for the date??


Complied with Date fix and:
FLEX SDK 4.1 and AGS FLEX 2.4
0 Kudos
HaroldBostic
Occasional Contributor II
Let me know if these updates work

Complied with Date fix and:
FLEX SDK 4.1 and AGS FLEX 2.5
0 Kudos
heatherGrybas
New Contributor
This widget is a life saver! Thanks for posting the compiled version for 2.5. I'm still having a small problem querying dates. All the data for my viewer is in an ArcSDE database which automatically adds the time along with the date. When I use the widget and attempt to query a date it doesn't return any results because it needs a time (When I manually type in the time than it works). The widget doesn't bring up the dates with the time though in the list of unique values, only date alone. Is there a way to fix that or if anyone knows how to turn the time off in the date field that would work too.

Thanks the great widget!

-Heather
0 Kudos
HaroldBostic
Occasional Contributor II
This widget is a life saver! Thanks for posting the compiled version for 2.5. I'm still having a small problem querying dates. All the data for my viewer is in an ArcSDE database which automatically adds the time along with the date. When I use the widget and attempt to query a date it doesn't return any results because it needs a time (When I manually type in the time than it works). The widget doesn't bring up the dates with the time though in the list of unique values, only date alone. Is there a way to fix that or if anyone knows how to turn the time off in the date field that would work too.

Thanks the great widget!

-Heather


Same SDK - 4.1 and AGS 2.5  It has the Date and Time formatter, but I don't have time data available to test this out.  Can you work with the uncompiled version?  If you can't work with the uncompiled version and this version does not work for you, I can abstract out the Date Time formatter into the config file (probably the best solution anyway), but I can't get to that for a few days, Maybe Tues or Weds.

Let me know if this at least helps
0 Kudos
heatherGrybas
New Contributor
Same SDK - 4.1 and AGS 2.5  It has the Date and Time formatter, but I don't have time data available to test this out.  Can you work with the uncompiled version?  If you can't work with the uncompiled version and this version does not work for you, I can abstract out the Date Time formatter into the config file (probably the best solution anyway), but I can't get to that for a few days, Maybe Tues or Weds.

Let me know if this at least helps



It's working perfectly now. Thanks for the help.
0 Kudos
AshleeMoore
New Contributor II
Hi!

I'm thrilled to have found a widget like this - thank you!!

But I'm running into a little snag...someone in an earlier post had the same problem, but I never saw a response to it.

I'm running Flex 2.4 and have downloaded the latest versions of the .xml and .swf files for the widget. Everything appears to run smoothly except that when I try to query the 'get unique values' doesn't populate automatically for the field I'm trying to query against.

Am I missing something? I'm fairly new to Flex so it could be a pretty basic 'something' that I'm overlooking.

Thanks a million!!

Ashlee
0 Kudos
CarolineCochrane
New Contributor III
Ashlee - sorry to bother you - but did you get this problem with 'unique values' not showing up resolved? i am having the same issue since upgrading my flexviewer (to 2.3.1).

Thanks,

Caroline
0 Kudos
AshleeMoore
New Contributor II
Ashlee - sorry to bother you - but did you get this problem with 'unique values' not showing up resolved? i am having the same issue since upgrading my flexviewer (to 2.3.1).

Thanks,

Caroline


Hi Caroline! You aren't bothering me at all. 🙂

No, I still haven't gotten the issue resolved; I'm hoping someone who has will reply to the thread. I'll keep you posted if I ever get an answer.

Happy New Year!

Ashlee
0 Kudos
HaroldBostic
Occasional Contributor II
Hello, I believe the issue of the unique fields not showing up is due to how the query works.  I believe the field that you are having issues with is a non-string field.  If that's the case and you are working with the uncompiled version:

in utils/PagingQueryTask.as around line 184, you want to change query.text = "%" to query.where = "1=1"

I'm almost positive that change is reflected in the versions with the date and time fix found here:
http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version?p=157653&viewfull=1#post1576...

http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version?p=157654&viewfull=1#post1576...

http://forums.arcgis.com/threads/30179-Selection-Widget-Updated-Version?p=157756&viewfull=1#post1577...

Let me know if that fixes the issue
0 Kudos
AshleeMoore
New Contributor II
Ashlee - sorry to bother you - but did you get this problem with 'unique values' not showing up resolved? i am having the same issue since upgrading my flexviewer (to 2.3.1).

Thanks,

Caroline


Hi again Caroline,

I think I might have solved my problem.

When I was pulling in the url for the layer in the SelectionWidget.xml file, I was using the FeatureServer service instead of the MapServer service from my rest services directory. (The layer I am using is editible also.)

When I tried using the MapServer url I got the unique values list to populate.

Hopefully this fix will be as easy for you!

Ashlee
0 Kudos