Select to view content in your preferred language

Selection Widget for SFV2.2 (with a query builder)

6948
50
02-21-2011 11:55 AM
MarkHoyland
Frequent Contributor
The Selection widget has a "Select by Attributes" and "Select by Location" option similar to ArcGIS.
It has options where you can set your selection type eg New Selection, Add to Selection, Remove from Selection.
Select from multiple layers that interstect/contain etc another layer.
You can view the results for each layer in a datagrid, and export to tab delimited text file.

Widget link: http://www.arcgis.com/home/item.html?id=20ed6af9ab204548bbf092d51b51fef8

I built this because it seemed like a fun project and the temptation of a Flex a Widget T-shirt was too much to resist.:o

If you download please leave feedback and rate the widgets (this should apply to any widget you download) as the feed back really helps to know what users are after.
Tags (2)
0 Kudos
50 Replies
MikeMartin
Occasional Contributor
Great widget Mark, just what I've been looking for. I do have a problem with the Get Unique Values not loading, however. Everything else works great. Is there a setting for the layer's service I need to look for? Thanks.

Mike
0 Kudos
MarkHoyland
Frequent Contributor
I do have a problem with the Get Unique Values not loading


Mike,
Do you mean you are not getting a full list or none at all.
If you are not getting a full list then it has been mentioned previously in this thread
Lisa,
List not showing all unique values is to do with an ArcGIS Server setting which controls the amount of features allowed to be returned. The setting can be changed in the server. See the comments on the page where you can download the Selection widget as there is an answer in one of the comments.

If you are not getting any values at all, please post your selectionwidget.xml file.
0 Kudos
MikeMartin
Occasional Contributor
Mike,
Do you mean you are not getting a full list or none at all.
If you are not getting a full list then it has been mentioned previously in this thread

If you are not getting any values at all, please post your selectionwidget.xml file.


Thanks for replying Mark. I am not getting any at all.
<?xml version="1.0" ?>
<configuration>
    <layers>
        <layer>
            <name>Water Wells</name>
            <url>http://dnrmaps.dnr.in.gov/ArcGIS/rest/services/ProgramMaps/WaterWells_DNR_102100/MapServer/1</url>
            <titlefield>DBLREFNO</titlefield>
            <linkfield></linkfield>
          <fields>
            <field name="DBLREFNO"/>
          </fields>
        </layer>
    </layers>
    <zoomscale>50000</zoomscale>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>
0 Kudos
francescodi_vito
Deactivated User
Hi Mark
but is it possible to extend the widget's function for a map service with a relationshio class?
0 Kudos
MarkHoyland
Frequent Contributor
Hi Mark
but is it possible to extend the widget's function for a map service with a relationshio class?


Francesco,
I have not done anything with relationship class, so I dont know the answer to that.
0 Kudos
MarkHoyland
Frequent Contributor
mmartin;89662 wrote:
Thanks for replying Mark. I am not getting any at all.


Mike,
I could do some testing on your layer. When I query it gives an error message:
{
  "error" : 
  {
    "code" : 500, 
    "message" : "No display field", 
    "details" : []
  }
}

You will have to set the display field. I think the display field is set in ArcMap under the display tab or the label tab.

I also tested another layer of yours (Significant Withdrawal Wells ID: 0) and found that I had to change the query method before it would work.

In SelectionByAttributes.mxml the function retreiveFieldValues, I had to comment out the query.where"1=1" and add a new line of query.text = "%".
Not sure why text worked and 1=1 did not work on your layer, as both methods are doing the same thing.

If you can access the source code, I would suggest making the change.
//query.where = "1=1";
query.text = "%";
0 Kudos
MikeMartin
Occasional Contributor


In SelectionByAttributes.mxml the function retreiveFieldValues, I had to comment out the query.where"1=1" and add a new line of query.text = "%".
Not sure why text worked and 1=1 did not work on your layer, as both methods are doing the same thing.

If you can access the source code, I would suggest making the change.
//query.where = "1=1";
query.text = "%";


URLs with 1=1 are blocked by our IOT folks. I've had to use OBJECTID>-1 for queries; unfortunately, I am unable to access/change the source code...but I definitely think that is the issue. No matter what layer I use from our server I have the same problem, but no problems with the arcgisonline sample data. Thanks for your help Mark.
0 Kudos
francescodi_vito
Deactivated User
Thanks Robert
i have another question! is it possible to change the code for use the ALIAS of fields in the XML file?
0 Kudos
LisaArnold
Deactivated User
Lisa,
List not showing all unique values is to do with an ArcGIS Server setting which controls the amount of features allowed to be returned. The setting can be changed in the server. See the comments on the page where you can download the Selection widget as there is an answer in one of the comments.


Mark,

Thanks for your response. Unfortunately I didn't have this thread set to email notification so I am just seeing this now! I am aware of the ArcGIS Server setting which controls the number of features returned, however I don't think this is the culprit in my case. While my number of unique values does exceed that default limit, I am only getting ~50 unique values pulled into the selection tool. Let me know if you have an idea on what else might be going on.

Thanks!
0 Kudos
MarkHoyland
Frequent Contributor
Thanks Robert
i have another question! is it possible to change the code for use the ALIAS of fields in the XML file?

Franceso,
While it is possible, there is quite a bit of work to get this done. I am not looking at this option yet, but maybe in a version 2 of the widget.
0 Kudos