Enhanced Search Widget for FlexViewer 2.1

93204
767
10-25-2010 02:13 PM
RobertScheitlin__GISP
MVP Emeritus
All Here is my next widget in the FlexViewer 2.1 series

Special thanks to Erwan Caradec for contributing to this code.

The Enhanced Search Widget extends the standard search widget with a floating data grid and a new spatial query w/buffering.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e
Tags (2)
0 Kudos
767 Replies
RobertScheitlin__GISP
MVP Emeritus
All,

The requested enhancements and some minor bug fixes are done in this latest version 2.1.3.

PLEASE PAY ATTENTION to the IMPORTANT configuration changes.pdf
in this new version as some changes to the structure of the eSearchWidget.xml have been made and copying and pasting your older version will cause errors.
0 Kudos
deleted-user-RjoC4IOGTpoH
New Contributor
Another set of great enhancements Robert. Much appreciated.

I have the following code trying to get all the fields for a layer with no luck:

<layer>
   <name>Foreclosures September 2010</name>
   <url>http://gissrv1/ArcGIS/rest/services/StrategicPlanning/MapServer/1</url>
   <expression useforspatial="true">gis.DBO.AddressMaster.PCN LIKE '%[value]%'</expression>
   <textsearchlabel>Search by PCN Number [Example: 73414404010850000]:</textsearchlabel>
   <graphicalsearchlabel>Use one of the graphical search tools to select features</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <spatialrelationlayer>true</spatialrelationlayer>
   <titlefield>gis.DBO.AddressMaster.PCN</titlefield>
   <linkfield></linkfield>
   <fields all="true" gridfield="true"></fields>
   <zoomscale>4800</zoomscale>
</layer>


It only displays the title name. Shouldn't that return all the fields without having to specify the individual field names?

Thanks ....
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nestor,

   I definetly did not expect someone to use
<fields all="true" gridfield="true"></fields>

So as you can tell this does not work. I will look at getting this fixed in the next version.
0 Kudos
deleted-user-RjoC4IOGTpoH
New Contributor
Nestor,

   I definetly did not expect someone to use
<fields all="true" gridfield="true"></fields>

So as you can tell this does not work. I will look at getting this fixed in the next version.


I did not see any other way to include those fields in the datagrid so I took a shot.
Otherwise, Thank You for the great enhancements.

Nestor.
0 Kudos
deleted-user-RjoC4IOGTpoH
New Contributor
Good Morning Robert,
Hope your weekend went well.

I have a question for a probable enhancement in the future (if possible).
Would it be possible for the data grid to show the sum of user defined column(s)?
The user would add sum="true" or something to that effect for each field that needs to be totaled.

We have users constantly selecting features that include lengths, square yards, etc. that need a quick total. Currently they need to export to Excel each time.

Your contributions are always appreciated.

Nestor.
0 Kudos
RobertWetmore
New Contributor
Thank You, this is a very powerful widget.

The buffering works great but I can�??t seem to get the units to work out correctly.  Through trial and error I found that entering a buffer distance of 40 meters = 100 feet on my map.  Measuring with the draw widget confirms this.  Changing the bufferunit from UNIT_METER to UNIT_FOOT I get a buffer of about 76 feet when I enter 100 feet.  Changing the spatialReference from 4326 to 3857 (operational layer) or 102100 (base maps) makes no difference.  Is there a configuration that I am missing?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Robert,

   You are running into a very common issue with any attempt to globalize measurements and get accurate results. The best thing to do is use a UTM 1983 zone that is specific to your area of concern and that will provide you the best results.
0 Kudos
WendyWallace1
New Contributor
Great widget Robert!!!

Just wondering why when I do a text search - it's looking for my coded domains (#'s)
and show up as numbers instead of the actual values?
The identify widget works correctly - returns the values (text instead of the coded domain #'s).
I'm just not sure if it's the swf or xml that sets this?

Thanks for a great export tool as well!!
0 Kudos
deleted-user-RjoC4IOGTpoH
New Contributor
Good Morning Robert,

Hope your weekend went well.

I have the following code in the xml file.
It keeps ignoring the linkprefix entry and just returns the data in the field after the server name (http://gissrv1/[PAPA]).

<layer>
   <name>Parcel Name</name>
   <url>http://gissrv1/ArcGIS/rest/services/Cadastral/MapServer/3</url>
   <expression useforspatial="true">OWNERNAME1 LIKE '%[value]%'</expression>
   <textsearchlabel>Search by Owner Name [Example: Smith; Smith Robert]:</textsearchlabel>
   <graphicalsearchlabel>Use one of the graphical search tools to select features</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <spatialrelationlayer>true</spatialrelationlayer>
   <titlefield>PARID</titlefield>
   <linkfield linkprefix="http://www.co.palm-beach.fl.us/PAPA/aspx/web/detail_info.aspx?p_entity=" linksuffix="">PAPA</linkfield>
   <fields all="false">
    <field name="PARID" gridfield="true"/>
    <field name="OWNERNAME1" gridfield="true"/>
    <field name="OWNERNAME2" gridfield="true"/>
    <field name="SITEADDR" gridfield="true"/>
    <field name="PROPUSE" gridfield="true"/>
    <field name="ACRES" gridfield="true"/>
    <field name="EXEMPTION" gridfield="true" gridfieldonly="true"/>
    <field name="PADDR1" gridfield="true" gridfieldonly="true"/>
    <field name="PADDR3" gridfield="true" gridfieldonly="true"/>
    <field name="YEAR_ADDED" gridfield="true" gridfieldonly="true"/>
    <field name="SALE_DATE" dateformat="MM/DD/YYYY" gridfield="true" gridfieldonly="true"/>
    <field name="BOOK" gridfield="true" gridfieldonly="true"/>
    <field name="PAGE" gridfield="true" gridfieldonly="true"/>
    <field name="ZIP1" gridfield="true" gridfieldonly="true"/>
    <field name="MUNI" gridfield="true" gridfieldonly="true"/>
    <field name="SUBDIVNAM" gridfield="true"/>
    <field name="PRICE" gridfield="true" gridfieldonly="true"/>
    <field name="TOTMRKTVAL" gridfield="true" gridfieldonly="true"/>
    <field name="ASSESSVAL" gridfield="true" gridfieldonly="true"/>
    <field name="LANDVAL" gridfield="true" gridfieldonly="true"/>
    <field name="IMPRV_MRKT" gridfield="true" gridfieldonly="true"/>
    <field name="TOTALVALUE" gridfield="true" gridfieldonly="true"/>
    <field name="TOTTAXVAL" gridfield="true" gridfieldonly="true"/>
    <field name="PAPA" alias="PAPA Website Link" hyperlinkgridfield="true" hyperlinkaliastext="Click Here For PAPA Website"/>
   </fields>
   <zoomscale>2400</zoomscale>
  </layer>


Does the code look correct to you? If so, where should I look to see if there is a problem?

Thanks ...

Nestor.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nestor,

   Is this only happening in the floating grid or in the widget results as well?
0 Kudos