Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

113160
552
04-19-2012 08:03 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the next release of my eSearch Widget.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Version 2.5.1.7 - 4/19/2012
* Added ability to search (flat/standalone/no geometry) tables.
* This time all Zooming uses the same scaling (popup, datagrid, widget results, zoom to all).
* Added Relates icon/button to datagrids so that you can click on it in the datagrid to
  open relates choice dialog.
* Move all skins to a skins package for cleaner organization.
* Links that are not associated with a field now work.
* Ability to disable the relates tab in the fixed widget is now configurable.
552 Replies
RobertHarris1
Deactivated User
Robert, thanks for the great esearch widget.
How do you search on a text field that has a - in the middle of it? for example: I am trying to search a text field called VALVEID for valve numbers that are all formatted as follows: xx-xxx.
Below is a sample that keeps returning a 400 fault code.
<value prompt="Example: 15-015" isvaluerequired="false">upper(VALVEID) LIKE '%[value]%'</value>
<value prompt="Select from the following" uniquevalsfromfield="VALVEID" isvaluerequired="true" autosubmit="true">VALVEID LIKE '%[value]%'</value>

the uniquevalsfromfield displays a list of valve id's, but when I pick one to zoom to I get the 400 fault code.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Robert,

  As you are using the  uniquevalsfromfield you list only contains actual values from the data and you do not need a LIKE sql expression:

<value prompt="Select from the following"  uniquevalsfromfield="VALVEID" isvaluerequired="true"  autosubmit="true">VALVEID = '[value]'</value>
0 Kudos
RobertHarris1
Deactivated User
Thanks for the response. I have tried the selection with both the LIKE qualifier and no qualifier. I think the issue may be in my data but I am unsure how to check it. When searching a text field, how does the search tool handle a '-' dash in the middle of a string? In this case the string is a series of numbers ex: 15-015.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Robert,

   Because you are searching a string the dash does not make a difference at all. Have you tested your SQL query in the REST Service directory for that layer?
0 Kudos
RobertHarris1
Deactivated User
Sorry, I had <fields all="true"> set to false. Thank you for the great tool and the quick response.
0 Kudos
ChrisSchielein
Esri Contributor
Hi Rob,

Does your widget support this workflow:

I have two layers in the viewer:  A Zip Code layer and a Customer Point Layer
I want to locate Customers in a particular Zip that meet a certain criteria.  The customer search criteria would be entered in the attribute search and the Zip would be a spatial search that involves selecting a specific ZIP code number.

I can't seem to do this.  Spatial searches don't honor attribute query definitions and can't do a select from selection set or anything like that.

Also, is there an option to limit the search to the current map extent?

Thanks

Chris
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chris,

   Sorry to report that the answers to all are No. The workflow you are attempting is not supported.
0 Kudos
CaseyMcMillin
Emerging Contributor
I am new to this whole process and am having trouble configuring the eSearch Widget.  I am simply trying to query my address layer on the SITUS field and have been unable to get the configuration file to validate.  Here is what I have in the layer section:
        <layer>
            <token/>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>Address</name>
            <url>http://GIS01.lebanon.local/arcgis/rest/services/OperationalLayers/Planning/MapServer/2</url>
            <expressions>
                <expression alias="Address" textsearchlabel="Search Complete Address:" isvaluerequired="true">
                    <values>
                        <value prompt="Example: 925 Main St" isvaluerequired="true" upper(SITUS) LIKE upper('%[value]%')</value>
                    </values>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>
            <spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>ADDRESS</titlefield>
            <fields all="true"/>
            <links/>
            <zoomscale usegeometry="true" zoompercent="2"/>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
            <symbology>
                <simplemarkersymbol color="0xff0000" alpha="0.5">
                </simplemarkersymbol>
            </symbology>
        </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Casey,

   You had a syntax error in your expression (you were missing the areas indicated in red):

        <layer>
            <token />
            <definitionexpression />
            <enableexport>true</enableexport>
            <name>Address</name>
            <url>http://GIS01.lebanon.local/arcgis/rest/services/OperationalLayers/Planning/MapServer/2</url>
            <expressions>
                <expression alias="Address" textsearchlabel="Search Complete Address:" isvaluerequired="true">
                    <values>
                        <value prompt="Example: 925 Main St" isvaluerequired="true"> upper ( SITUS ) LIKE upper ( value ]%')</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>
            <spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>ADDRESS</titlefield>
            <fields all="true" />
            <links />
            <zoomscale usegeometry="true" zoompercent="2" />
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates />
            <symbology>
                <simplemarkersymbol color="0xff0000" alpha="0.5">
                </simplemarkersymbol>
            </symbology>
        </layer> 
0 Kudos
SeanKoenig
New Contributor
Robert,

Let me begin by thanking you for all of the research and development you've made available to the rest of us.  You really are quite brilliant.

I'm hoping you might be able to help me address some strange behavior with regards to the Esearch widget.  I have installed and configured the Esearch widget v3.2 (and the Identify widget v3.2) in an application I've built using ArcGIS Viewer for Flex Application Builder v3.2.  After several learning curves the Esearch widget functions exactly as I've intended by simply searching based on either situs address or parcel number.  Testing is successful in the following two environments: 1) Within the "Preview" tab in the Application Builder; and, 2) Within a browser after choosing the "Open in browser" drop-down option next to the application name as listed in ArcGIS Viewer for Flex Application Builder - My Applications window.  Now for the strange behavior...after choosing "Export" from the same drop-down list and opening the resulting application in another browser session, everything looks fine and the Identify widget continues to work as it did during testing; however, the Esearch widget does not work.  It opens and displays as expected however nothing happens when a search is attempted using the same search terms as used during testing.  No errors.  No crashes.  It simply doesn't perform the search it's configured to perform and as it does in the test environment.

FYI - I've ensured the feature service utilized by the Esearch is running, and that the ObjectID and Shape fields are visible when I publish the service.  (i'm thinking that my testing would have been unsuccessful if these matters had been an issue in the first place however I thought I'd mention it anyway)

Any ideas?

Thank you indvance!
Sean
0 Kudos