Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

178898
776
04-30-2013 03:58 PM
RobertScheitlin__GISP
MVP Emeritus
All,

   Here is a new thread to post questions and discuss the Enhanched Search Widget. The old thread was getting too long.
Tags (2)
776 Replies
AllisonKampbell
Regular Contributor
Hi Robert:  This is a great widget!  I would like to add a definition expression and I can't figure out the code to get it to work.  I would like to search for parks by park name but only parks within the City of Watertown.  When I use the definition query below, the park list still includes all parks within the County.  Could you give me a tip on my code?  I did run the same definition query expression in the REST and it does work there, only returning parks within the City of Watertown. 

Thanks, Allison

<layer>
            <useproxy>false</useproxy>
            <definitionexpression>Location = 'Watertown'</definitionexpression>
            <enableexport>false</enableexport>
            <enableprintgrid title="Selected Parks">true</enableprintgrid>
            <name>Parks</name>
            <url>http://gis.co.carver.mn.us/arcgis_ea/rest/services/OpenAccess/CC_Recreation/MapServer/6</url>
            <expressions>
                <expression alias="Parks" textsearchlabel="Search by Park Name:">
                    <values>
   <value prompt="Example: EVERGREEN PARK" field="NAME" isvaluerequired="false" uniquevalsfromfield="NAME" autosubmit="false" operator="AND">NAME = '[value]'</value>
      </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Click on a graphic below to select Parks. </graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>Park_ID</titlefield>
            <fields all="false">
                <field name="Park_ID" alias="Park Name" gridfield="true"/>
                <field name="Location" alias="Location" gridfield="true"/>
            </fields>
            <links/>
            <zoomscale usegeometry="true" zoompercent="1.2"/>
            <autoopendatagrid>true</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <symbology/>
        </layer>
0 Kudos
MichaelVolz
Esteemed Contributor
Robert:

Will the eSearch widget work with the latest 3.6 Viewer release?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Michael,

   Version 3.6 of the eSearch widget will be released soon, just not the day after the 3.6 viewer and API are released.
0 Kudos
AshleyPeters
Frequent Contributor
Hi Robert,

I'm using the 3.1 version of the viewer and the last version of the eSearch widget you created for that particular viewer.

I am getting error 1010 on the text portion of the widget. My viewer is set up where I have a strict graphical search and a strict text search. The graphical search is working fine.

I am also noticing that when I first try to search a layer in the text search, the 'search' button stays grayed out. I will change the layer and then I can do a search. That is when I get the 1010 error.

Any guidance on resolving this issue would be appreciated!

Ashley
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   Can I assume based on the outdated version of the viewer that you are using that you have had the eSearch widget working with other text searches? What does your eSearchWidget.xml look like for the errant layer?
0 Kudos
AyieKepong
Emerging Contributor
Robert,

May u assist me to display fields in Query Widget?

I've a hyperlink fields to display in list Query Widget but the data display as below in result query:
Hyperlink : <a href="picture_detail.pdf" target="_blank">Hyperlink</a>

How can I update QueryWidget.mxml to display the data like this in result query
Hyperlink : Hyperlink

The hyperlink is running in PopupWidget but I want to display the data same like esearch Widget result when there have hyperlink data.

Thanks
0 Kudos
AshleyPeters
Frequent Contributor
I've got the 3.0 version of the widget working on two maps. This is the first time I've used the 3.1 version of it. I'm hoping to get all of the maps updated to the newest version of the viewer in the next few months. I've attached the .xml as a .zip for my current problem.

Some additional information - I found a thread yesterday regarding this error. It had to do with having sublayers in the main config file. There was a fix available for the graphic search, but not the text search. Not sure if this is causing the problem or not.

Thanks for your help!

Ashley
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Allison,

   The issue you are having is that the unique value query that populates the dropdown is not currently programed to take the definitionexpression into consideration (an oversite). I will get this fixed in a future release.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   It is important to check if the widgets XML format has changed for certain elements when upgrading versions.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Allison,

   Version 3.6.1 now addresses your issue and the unique value dropdown list is now honoring the defention expression.
0 Kudos