Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

101438
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
RobertScheitlin__GISP
MVP Emeritus
Michelle,

   So I am sorry to say that I still am unable to see the issue you are seeing.

Here is my test steps:


  1. disabled text,spatial buttons (I don't think the visible="false" setting on the spark checkbox is significant for this test).

  2. set multipartgraphicsearch = false

  3. set the URL search to search with no slayer or exprnum set.

  4. I choose a graphical selection tool and selected some features without changing the search layer.


and  it all works fine.
0 Kudos
MichelleKinseth
New Contributor II
Michelle,

   So I am sorry to say that I still am unable to see the issue you are seeing.

Here is my test steps:


  1. disabled text,spatial buttons (I don't think the visible="false" setting on the spark checkbox is significant for this test).

  2. set multipartgraphicsearch = false

  3. set the URL search to search with no slayer or exprnum set.

  4. I choose a graphical selection tool and selected some features without changing the search layer.


and  it all works fine.


Thanks for trying - I'm sure it would be helpful if my viewer were accessible for you to see. I will look at it more today and if I still cannot figure out what the problem is I may be back next week with screenshots to try and show you what is happening! Thanks again for your help.
0 Kudos
DanMiller
New Contributor
Dan,

If you are talking about adding geocode service capability (i.e. locator widget type functionality) into this widget then I would have to say probably not going to happen. I am attempting to maintain the true intent of this widget (a search widget). The code base for this widget is already larger than any publicly available widget out there and is getting hard to test all of the different configuration possibilities that currently exist. I am in the process of developing an Enhanced Locator widget that I could make to have a tie in with the eSearch, like I do with the eDraw and Point Buffer Widget. If you are looking for the ability to locate and address and then use the eSearch to search based on that location point, then that is a possibility.


Robert, that is exactly what I'm trying to do - locate an address and then use eSearch to search layer for features off of that point.  However, do you mean that the specific address would already have to be in a field (e.g. "Addresses" field) as part of a layer to initially find it?  That wasn't really what I was looking for though, more of: type in an address, it zooms, and then perform a graphical search in that location.  But I wanted to get rid of the Locator widget because that's precious real estate on the screen, it'd be nice to just have a quick search as a tab in eSearch.

It'd also be nice to be able to search within a region such as a state/city limits as well but I think that's what you mean with the eLocator tying in with the eSearch?
0 Kudos
DanMiller
New Contributor
Hi Robert,

I tried using the Esri Geocode Server in my config file for a Text search, it returned an error that said returned an invalid Feature service.  Here is the code:
 <name>Locator</name>   <url>http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Places_World/GeocodeServer</url>
   <expressions>
    <expression alias="Locator" textsearchlabel="Enter 2 Digit State Abbreviation:">
     <values>
      <value prompt="Example: AZ" isvaluerequired="false" field="status"  usedomain="true" autosubmit="false">State_Abbr = '[value]'</value>
     </values>
    </expression>
   </expressions>

My plan was to just add in value prompts for City/State/ZIP etc, but suppose there's no way to get this Geocode Server map service to work with eSearch?

Thanks,
Dan
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dan,

   As I mentioned in my earlier post the Enhanced Search Widget is a search widget not a Geocode widget, thus it does not support the use of a GeocodeServer url as that would need to a completely different base task from the API to be used. The eSearch uses the QueryTask and not a Locator task under the hood. To reiterate my other post again, I have no plans to add locator capabilities to this widget. I will be looking at integration of the using locator results (from a locator widget) to perform a search.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   New version available:

Version 3.1.9 - 2/19/2013
* autoopendatagrid is now honored by the fixed datagrid as well as the floating datagrid.
* Drop down lists no longer initializes with no item selected as they did in versions 3.1.7 & 8.
* Handle IN SQL statements in expressions and automatic single quoting of values if expression is expecting strings.
* Fixed escaping of single quotes in user values if more than one exist (i.e. O'Malley and O'Leary Inc).
* Added integration with the Enhanced Locate Widget.
* Fixed issue where widget title button for results was not always selected (shown with underline) when results view was activated.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bob Solley,

   The issue with using an IN SQL statement has been resolved in the latest version (3.1.9). In the eSeacrhWidget.xml you will use:
test.PLOT IN ('[value]')
and
esearch=7SFG,I-27
Notice I removed the need to have the commas surrounded by single quotes. If you are using a IN SQL statement in the widgets GUI than it does not matter if the user wraps their entries in single quotes or not as the code will handle it either way.
0 Kudos
JohnLucotch
New Contributor III
Can you have more than one uniquevaluesfromfield within expressions?  I can't get it to work in the 3.1 version.
0 Kudos
DanMiller
New Contributor
Dan,

   As I mentioned in my earlier post the Enhanced Search Widget is a search widget not a Geocode widget, thus it does not support the use of a GeocodeServer url as that would need to a completely different base task from the API to be used. The eSearch uses the QueryTask and not a Locator task under the hood. To reiterate my other post again, I have no plans to add locator capabilities to this widget. I will be looking at integration of the using locator results (from a locator widget) to perform a search.


Thanks for the reply Robert, that explains it.  I'm looking forward to the new locator/search integration!

One quick question with Enhanced Search - when adding more than one <value prompt="Example: text"></value> per expression, there is an extra space (as in carriage return) added between the heading ("Example: text") and the text box.  Is there an easy way I can get rid of this extra blank line?  I was thinking maybe it's created in the mxml somewhere (I use the uncompiled version).  I use about 4 value prompts so it'd be less confusing for the users if that space was eliminated.  Some of the users thought that "Example: text" was referring to the box above it since the space is there. 

Thanks,
Dan
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
John,

  Yes you can. Here is an example using an esri public service.

<layer>
            <token/>
            <definitionexpression></definitionexpression>
            <enableexport>true</enableexport>
            <name>Louisville Zoning</name>
            <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2</url>
            <expressions>
                <expression alias="Zoning Type" textsearchlabel="Search Zoning Type:" isvaluerequired="true">
                    <values>
                        <value prompt="Example: OR1" uniquevalsfromfield="ZONING_CODE" isvaluerequired="true" autosubmit="false">ZONING_CODE = '[value]'</value>
                        <value prompt="Example: RESIDENTIAL" uniquevalsfromfield="ZONING_TYPE" isvaluerequired="false" autosubmit="false" operator="AND">ZONING_TYPE = '[value]'</value>
                     </values>
                </expression>
                <expression alias="Zoning Code" textsearchlabel="Search Zoning:" isvaluerequired="true">
                    <values>
                        <value prompt="Example: OR1" userlist="OR1,C2,OTF,all" >ZONING_CODE = '[value]'</value>
                        <value prompt="Example: OFFICE" operator="AND">ZONING_TYPE = '[value]'</value>
                    </values>
                </expression>
                <expression alias="Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">
                    <values>
                        <value prompt="Example: RES MULTI-FAMILY" isvaluerequired="true">upper(ZONING_NAME) LIKE upper('%[value]%')</value>
                    </values>
                </expression>
                <expression alias="Multiple Zoning Name" textsearchlabel="Search Zoning Name [ Example: RES MULTI-FAMILY ]:">
                    <values>
                        <value prompt="Example: COMMERCIAL,COMM MANUFACTURING" isvaluerequired="true">ZONING_NAME IN ('[value]')</value>
                    </values>
                </expression>
                <expression alias="Open SQL" textsearchlabel="Search by Typing Full SQL:">
                    <values>
                        <value prompt="Example: ZONING_NAME = 'COMM MANUFACTURING' AND ZONING_TYPE = 'COMMERCIAL-INDUSTRIAL'">[value]</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Zoning</graphicalsearchlabel>
            <spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>ZONING_NAME</titlefield>
            <fields all="true" />
            <links/>
            <zoomscale usegeometry="true" zoompercent="2"></zoomscale>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
            <symbology>
                <simplefillsymbol color="0xff0000" alpha="0.5">
                    <outline color="0xff0000" alpha="0.8" width="2" />
                </simplefillsymbol>
            </symbology>
        </layer>
0 Kudos