Select to view content in your preferred language

Enhanced Search Widget for FlexViewer 2.1

110202
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
LisaArnold
Deactivated User
I am using the linkfield element to enabling linking to pdf files. My linkfield 'RptLink' contains only the file name, no path, no extension. When I click on the icon element from the search results, I am successfully linked to the proper pdf file and the address in the browser is correct (http://gis-web.heritage.unm.edu/gpd/reports/04-gtr-264.pdf) If I view my search results in the grid view and I click on the link to the report there, I get a 404 File not found error and I see that the path in the browser is incorrect (http://gis-web.heritage.unm.edu/gpd/04-gtr-264). Please see my search widget configuration below. Anyone see what I'm doing wrong?

            <graphicalsearchlabel>Use one of the graphical search tools to select Field Validation points</graphicalsearchlabel>
   <spatialsearchlayer>true</spatialsearchlayer>
   <titlefield>Source</titlefield>
            <linkfield linkprefix="http://gis-web.heritage.unm.edu/gpd/reports/" linksuffix=".pdf">RptLink</linkfield>
   <icon isfield="true" iconprefix="" iconsuffix=""></icon>
            <fields all="false">
                <field name="SciName" alias="SciName" gridfield="true" gridfieldonly="true"/>
                <field name="FieldYr" alias="FieldYr" gridfield="true"/>
                <field name="FieldStatus" alias="FieldStatus" gridfield="true"/>
    <field name="Seen" alias="Seen" gridfield="true" gridfieldonly="true"/>
    <field name="OtherSpecies" alias="OtherSpecies" gridfield="true" gridfieldonly="true"/>
    <field name="Surveyor" alias="Surveyor" gridfield="true" gridfieldonly="true"/>
    <field name="Source" alias="Source" gridfield="true" gridfieldonly="true"/>
    <field name="FieldNotes" alias="FieldNotes" gridfield="true" gridfieldonly="true"/>
    <field name="RptLink" alias="RptLink" hyperlinkgridfield="true" gridfieldonly="true" hyperlinkaliastext="View report"/>
    <field name="SourceShape" alias="SourceShape" gridfield="true" gridfieldonly="true"/>
    <field name="ObsLocation" alias="ObsLocation" gridfield="true" gridfieldonly="true"/>
    <field name="FieldDate" alias="FieldDate" gridfield="true" gridfieldonly="true"/>
    <field name="POINT_X" alias="POINT_X" gridfield="true" gridfieldonly="true"/>
    <field name="POINT_Y" alias="POINT_Y" gridfield="true" gridfieldonly="true"/>
    <field name="State" alias="State" gridfield="true" gridfieldonly="true"/>
    <field name="County" alias="County" gridfield="true" gridfieldonly="true"/>


Thanks,
Lisa Arnold
University of New Mexico
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lisa,

   You are missing the link prefix and suffix here:

<field name="RptLink" alias="RptLink" hyperlinkgridfield="true" gridfieldonly="true" hyperlinkaliastext="View report" linkprefix="http://gis-web.heritage.unm.edu/gpd/reports/" linksuffix=".pdf"/>
0 Kudos
LisaArnold
Deactivated User
Great thanks, I wasn't recognizing the functionality of the linkfield element as separate than the field attributes.

Why though in the gird view does it always put the hyperlinked field last?

Thanks,
Lisa Arnold
University of New Mexico
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lisa,

   Currently that is just one of those FEATURES of the widget...
0 Kudos
EricVenden
Frequent Contributor
Gerald,

That was it!!!..I had OBJECTID and Shape fields unchecked in the mxd.
Thanks very much.

Eric V
Gurnee, IL
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thanks Gerald!

Eric,

    sorry sometimes I forget to look for the simple things.
0 Kudos
EricVenden
Frequent Contributor
No problem Robert..I should have looked at that..had issues in the past with IMS relating to that.

Robert - Can results be sorted?

Thanks
Eric
0 Kudos
GeraldLee__GISP
Frequent Contributor
Eric,
Very cool. glad i could help someone for a change. Usually its the other way around..
Gerald

btw--Please dont say IMS. i get nauseous.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

   In the Floating Data Grid yes just use the column header to sort.
0 Kudos
EricVenden
Frequent Contributor
Robert,
I tried clicking the column header in the floating grid - it does not sort the column.  I looked at the documentation - is there a config for this in the xml or is it "built-in"?

Thanks
Eric
0 Kudos