Select to view content in your preferred language

Selection Widget Updated Version

45263
146
05-12-2011 05:24 AM
MarkHoyland
Frequent Contributor
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
StevenEakins
Deactivated User
Hi Francesco,
It is not set up to work with relationships.

It works with data that has a join set in ArcGIS.


Mark,

  Your widget is excellent.  I have set up the widget with a join and am having a spot of trouble I hope you can help me with.  I am able to see the fields but not get values from them.  When I click on the "Get Unique Values" button it counted to the correct number of values related to that field but does not display the results in the box below the Values: label.  If I use the Select * from text box and I manually enter the value the widget does return the results on the map. I have attached a screen shot for your review.

  I would appreciate any help you can provide and offline I can send you the url for the rest service we use.

  BTW I lived in North Sydney and worked in Chatswood for 14 months and loved every minute of it. 🙂

Cheers!
Steven
0 Kudos
PedroGarcia
Deactivated User
Thanks Mark,

I'll try and modify the querytask to pull our data.

Curtis


Hi Curtis,

I have the same problem. I would be very grateful if you upload your source code that correct this problem.

ps. Great widget Mark! but, is it possible that you fix that problem to work with ArcGIS 9.3.1 version as well?
0 Kudos
LefterisKoumis
Frequent Contributor
Attached is the compiled version that works with flexviewer 2.4.
I tested it and it works, but use it at your own risk and I assume no responsibility for anything.


How do you manually recompile the older version to work in 2.4?  I downloaded a trial of Adobe Flash Builder, and have no problem doing it myself.  I just have no idea where to start...
0 Kudos
deleted-user-7vNhuz1LBLnm
Deactivated User
Thank you for the widget.  Been using it for awhile and even upgraded it to 2.4.  However, the issue with the layer populating the TOC is still an issue in one sense; if the user opens the Selection widget first, let it populated its array fully and then opens the TOC, the layers populate the TOC.  Any suggestions in code to fix that would be appreciated.

We are using the TOC/Legend Widget that the Legend is a separate tab from the TOC if that makes a difference.  Not sure which version of Robert's TOC widgets (maybe 2.2) that is.

Thanks,
Glenn Russell
Idaho National Lab
0 Kudos
SaraRoth
Emerging Contributor
Attached is the compiled version that works with flexviewer 2.4.
I tested it and it works, but use it at your own risk and I assume no responsibility for anything.


Thanks so much for providing this! Could you please upload the uncompiled version of the updated widget? I would appreciate it greatly!
0 Kudos
AndrewHargreaves
Deactivated User
I am unable to configure this widget. The first layer in my mapservice contains water meters, with an attribute named 'UTMTR' that holds each meters unique number. I have the below in my selectionwidget.xml but it fails to automatically 'get unique values' from the UTMTR column:

<layer>
            <name>AMR Meter Class</name>
            <url>http://ags2.cdm.com/arcgis/rest/services/Arlington/MapServer/0</url>
            <fields>
                <field name="UTMTR"/>
            </fields>
            <titlefield>UTMTR</titlefield>
            <linkfield></linkfield>
            <infowindowfields>
             <field name="UTMTR"/>
   </infowindowfields>
        </layer>
0 Kudos
JustinCarasick
Emerging Contributor
anyway to get the selection widget to honor the infoTemplate cofigs from the config.xml?

i see this in the init prior to calling infoReady. I tried setting the config variable with the popup xml path but didn't seem to work.
     var data:Object =
      {
       id: String(this.widgetId),
       url: infoUrl,
       config: null
      };
0 Kudos
MelVanderWal
Emerging Contributor
Hi Mark.

It's a great widget, thanks for your hard work.

I have a feature request, if I may.  Would it be possible to have an option to constrain the results to the extent visible on screen?  I have layers with hundreds of thousands of features, the use case is "in the area that I'm looking at, which features are x and y and z".  I suppose it could be a config option, or part of the Selection Options screen.

Thanks again for sharing your great work.

Cheers,
Mel
0 Kudos
JaredAllen
Emerging Contributor
Thank you for providing this great tool.

I'd like to make a few comments...

1) When using the current download version there's a warning that is easily fixed by commenting out line 196 of the SearchWidget.mxml and replacing it with AppEvent.dispatch(AppEvent.DATA_CREATE_INFOWIDGET, data, infoReady);

2) I'd like to see the Unique Values list use the coded domain values (like the info popup)

3) I am using ArcServer 10sp2, ArcSDE 10sp2, FlexViewer 2.4, and SearchWidget 1.5. All data exists within the SDE. Three of my layers will not render unique values at all for any of the fields. The remainder of my layers will render unique values for all fields. My record limit on the service is set to 100k, and some of the layers that do show unique values have >8k records. So, I'm stumped as to why the pesky three are not returning record values.

Any comments?
0 Kudos
NickDeMerchant
Emerging Contributor
Hi Matt,

Did you ever get anywhere on the date formatting with the selection widget?

Thanks,

Nick


Fantastic functionality added to FSV.  Thanks for sharing this great tool.

Is there anyway to have date values in the unique values box formated as dates, rather than the numbers that are actually stored?

For example :
<format dateformat="shortDate"/>
or
dateformat="MM/DD/YYYY"

Thanks,
Matt Shetzer
0 Kudos