Selection Widget Updated Version

41672
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
elianaojeda
New Contributor II
Hello,

How can I compile my widget in order to include it in Flex viewer 2.5 (IIS 5.1 on xp)?
I compiled itwith ESRI Flex API 2.5, Flash Builder 4.5 and I'm having this error message:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.core::CrossDomainRSLItem()
at mx.core::FlexModuleFactory/getRSLInfo()
at mx.core::FlexModuleFactory/update()
at mx.core::FlexModuleFactory/moduleInitHandler()
0 Kudos
tanyabisen
New Contributor
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


Dear All,


    I am unable to configure this widget. I configured the xml and when I click the feature its unable to retrieve the unique values.Following is the map service I am using : http://agis.pipetrakit.com/ArcGISPetroIT/rest/services/GAILDABPL/MapServer/29

This is what I have configured in the XML.
<layers>
     <layer>
            <name>Benchmark</name>
            <url>http://agis.pipetrakit.com/ArcGISPetroIT/rest/services/GAILDABPL/MapServer/30</url>
            <minscale>500000</minscale>
            <maxscale>10</maxscale>
             <fields>
                <field name="BM__NO_" alias="BM__NO_"/>
                <!--<field name="LATITUTE"/>
                <field name="LONGITUDE"/>
                <field name="DESCRIPTIO"/>-->
            </fields>
            <titlefield>Benchmark No</titlefield>
            <linkfield linkprefix="http://www.test1.com." linksuffix=".txt">URL_FIELD</linkfield>
            <infowindowfields>
             <field name="BM__NO_"/>
                <field name="LATITUTE" alias="Latitude"/>
                <field name="LONGITUDE" alias="Longitude"/>
                <field name="DESCRIPTIO" alias="Description"/>
   </infowindowfields>
        </layer>

Please anyone help me on this.

Thanks,
Tanya
0 Kudos
DeanSeales
New Contributor
Hello,

I am trying to use this widget in Flexviewer 2.5; however, in spite preload="open" the widget does not open.

Thank you for your assistance...
0 Kudos
PeterLovell
New Contributor II
First off, thanks much for developing this excellent widget.  I'm having a similar experience to Jared (post #29) where I am using the Selection widget on numerous layers, some of which provide unique values and others of which do not when I am entering a query.  I didn't see a response to Jared's post so was wondering if anyone else had experienced similar difficulties and found a solution.  Thanks!
0 Kudos
EricGardecki
Occasional Contributor
I'm using the version of this widget that is attached to a post above...the one for FV 2.5 (and date/time fix).  I'm having the same problem as someone from a different thread (http://forums.arcgis.com/threads/24151-Selection-Widget-for-SFV2.2-(with-a-query-builder) was having.  The layers that are used in the query in the Selection widget are being added to the TOC.  This is causing messy issues with my popups.  In that thread it says that it was fixed in the code but obviously I'm still having the issue.  I'm only able to use the compiled version.  Is there a different version I should be using?  Has this truly been fixed?

Thanks
0 Kudos
AngieAllison
New Contributor II
Let me know if these updates work

Complied with Date fix and:
FLEX SDK 4.1 and AGS FLEX 2.5


date and time is still not working correctly.  what i am seeing on the screen has all strange dates in the selection results.  the top one i had says 12/31/1969 but the data is actually null?????
Thus the exported data is wrong as well.
0 Kudos
AngieAllison
New 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


it has not fixed the issue i have very strange dates in the queried data.
0 Kudos
HaroldBostic
Occasional Contributor II
what is the exact issue you are facing
0 Kudos
AngieAllison
New Contributor II
what is the exact issue you are facing


the date fields do not display correctly,  first it had the long numbers, so i updated the version - then it had fictisious dates - even where there should be null values.  then i tried the version with the date and time fix and it has ficticious dates and times.
see attached.  the first one is correct in the facility id install date should be null but on the 2nd and 3rd versions it puts in some strange date even for null values.  the first one has that long number in it.
0 Kudos
HaroldBostic
Occasional Contributor II
In your first image, what should the correct dates be?  Are you using the compiled or uncompiled version?  Is that particular map service available publicly so I can test it.  How are the dates entered into the database?  What is the backend database?
0 Kudos