Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

110111
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
deleted-user-RjoC4IOGTpoH
Deactivated User
Thanks for another great enhancement.

I am having some weird issues with the infopopup displaying the data.

For instance, if select a bunch of parcels, the data is displayed correctly in the results table and the datagrid, but in the infopopup, the data is displayed correctly most of the way down then the fields begin to display values from other rows in the datagrid. Sometimes the fields will be duplicated with different values.

In addition, the url link is displayed as an underlined url instead of and alias or an arrow.

Thanks ...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nestor,

   You are going to have to give so specifics on this... Are you using all the fields of your data by using
<fields all="true">
Can you provide some screen shots? As far as the hyperlink being a url that is underlined that is the default in FlexViewer 2.1 now.
0 Kudos
deleted-user-RjoC4IOGTpoH
Deactivated User
Nestor,

   You are going to have to give so specifics on this... Are you using all the fields of your data by using
<fields all="true">
Can you provide some screen shots? As far as the hyperlink being a url that is underlined that is the default in FlexViewer 2.1 now.


Sure thing, here is the code:
[HTML]<layer>
   <name>Parcel Name</name>
   <url>http://gissrv1/ArcGIS/rest/services/Cadastral/MapServer/3</url>
   <expression>OWNERNAME1 LIKE '%[value]%'</expression>
   <textsearchlabel>Search by Owner Name [Example: Smith Robert; Smith]:</textsearchlabel>
   <graphicalsearchlabel>Use one of the graphical search tools to select features</graphicalsearchlabel>
    <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"/>
    <field name="PADDR1" gridfield="true" gridfieldonly="true"/>
    <field name="PADDR3" gridfield="true" gridfieldonly="true"/>
    <field name="YEAR_ADDED" gridfield="true"/>
    <field name="SALE_DATE" dateformat="MM/DD/YYYY" gridfield="true"/>
    <field name="BOOK" gridfield="true"/>
    <field name="PAGE" gridfield="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"/>
    <field name="TOTMRKTVAL" gridfield="true"/>
    <field name="ASSESSVAL" gridfield="true"/>
    <field name="LANDVAL" gridfield="true"/>
    <field name="IMPRV_MRKT" gridfield="true"/>
    <field name="TOTALVALUE" gridfield="true"/>
    <field name="TOTTAXVAL" gridfield="true"/>
    <field name="PAPA" alias="PAPA Website Link" hyperlinkgridfield="true" hyperlinkaliastext="Click Here For PAPA Website"/>
   </fields>
   <titlefield>PARID</titlefield>
   <linkfield>PAPA</linkfield>
   <zoomscale>4800</zoomscale>
  </layer>[/HTML]

If you notice in the screenshot of the popup, all the values are good down to Improvement Value, then Total Value is missing, the first Total Taxable value is from some other row and then there is the correct Total Taxable value last.

If I display more fields then I get more duplicates. Sometimes there are no duplicates, just the wrong value. Not consistant.

Ever see that before?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nestor,

   I can not explain this odd behavior but would ask that you test this using the default searchWidget and see if the results are the same. The one thing I will say is that the reason I created the enhanced Search Widget is because I wanted a way to get more results back about a parcel without having a huge info popup. So you might want to limit the info popup to a more limited amount of data and just have the grid display all the rest.
0 Kudos
JohnGregorovic
Deactivated User
Works great, I am using the compiled version and I've had no problems.
0 Kudos
deleted-user-RjoC4IOGTpoH
Deactivated User
Nestor,

   I can not explain this odd behavior but would ask that you test this using the default searchWidget and see if the results are the same. The one thing I will say is that the reason I created the enhanced Search Widget is because I wanted a way to get more results back about a parcel without having a huge info popup. So you might want to limit the info popup to a more limited amount of data and just have the grid display all the rest.


It works fine with the default search. I will do like you say and trim down the results for the info popup.

Thanks !!
0 Kudos
SamBishop
Deactivated User
Robert everything looks fine if i explicitly define an alias attribute on a hyperlink field e.g. alias="Link".  Without this, the column name displayed on the grid is not the 'default' column alias and the hyperlinkaliastext is ignored.  Hope this is helpful.
0 Kudos
ErwanCaradec
Emerging Contributor
Hi robert, this is really a nice job !
Much thanks for having merged my code to your wonderfull enhanced version. I'm currently testing it on my local Network.

I would have some suggestions :
- About Xander post for where clause of the spatial search, i'm 100% agree with you that where clause are for the advanced users. But a boolean parameter may coul'd be added in the config file for each layer to use or not the search text expression as where clause.
- like in your identifyWidget, coul'd you add hyperlink prefix/suffix and icon field/prefix/suffix ?
- for the frenchy users, coul'd you add a parameter for the csvSeparator because of the windows regional and language options 😉

Regards,
Erwan
0 Kudos
RobertWetmore
Emerging Contributor
- like in your identifyWidget, coul'd you add hyperlink prefix/suffix and icon field/prefix/suffix ?


I agree!


Nice work Robert.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   This is going to become a seriously complicated widget... But these enhancements are now on the list for next version.
0 Kudos