Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

179962
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
GregWolowich1
Occasional Contributor
Greg,

  I can take a look at your xml if you want me to.


Thanks Robert,

I've narrowed down the hunt. It appears that the new widget does not like return many results on my spatial views. Any other layer works fine. Just not the spatial views. Works at 2.4 not at 3.4. The only other variable that changed is the data was moved from ESRI binary spatial data type to SQL Server geometry data type.

Again, the REST services will return many results, just not the widget in the app.

Thanks,

Greg
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Greg,

   I do not work with spatial views or SQL Server geometry data types so this is going to be very difficult for me to diagnose on my end. If you get to the point where you are willing to share more, namely your xml and access to your data (or just a test sample of it), let me know.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A new version is now released.

Version 3.6.5 - 4/3/2014
* Changed export GUI design to minimize footprint.
* Added buffer support to eDraw, eLocate and pointBuffer.
0 Kudos
StewartGalloway
Occasional Contributor
I have added the esearch widget but the actual �??Search�?� button is greyed out and the widget does not work.  Can you please review the following and help to debug it?
ArcGIS Viewer for Flex
Application builder version 3.3
ArcGIS 10.1 for Server (Windows)
eSearchWidget for AppBuilder3.3

1) The widget opens automatically.
The main config.xml contains this reference to esearch widget:
<widget url="widgets/eSearch/eSearchWidget.swf" config="widgets/eSearch/eSearchWidget_2.xml" label="Enhanced Search Widget" icon="assets/images/i_search.png" preload="open"/>
    </widgetcontainer>
</configuration>

Or do I need to add the following :
<widget label="Enhanced Search" left="60" top="350" preload="open"
icon="assets/images/i_search.png"
config="widgets/eSearch/SearchWidget.xml"
url="widgets/eSearch/SearchWidget.swf"/>

2) The following is the changes that have been made in order to use our data:
<configuration>
    <layers>
        <layer>
            <token/>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>NYARNG UNITS</name>
            <url>http://ngnya0-gis-02:6080/arcgis/rest/services/UNITS/Units_Map2/MapServer/0</url>
            <expressions>
                <expression alias="Troop Command" textsearchlabel="Search Troop Command:" isvaluerequired="true">
                    <values>
                        <value prompt="Example: 153TC4" isvaluerequired="false" uniquevalsfromfield="TroopCommand"</value>
                        <value prompt="Example: 153 TC" isvaluerequired="true" operator="AND">upper(TroopCommand) LIKE upper('%[value]%')</value>
                        <value prompt="Example: 153 TC2" isvaluerequired="true" operator="AND">TroopCommand= '[value]'</value>
                        <value prompt="Example: 153 TC3" uniquevalsfromfield="TroopCommand" isvaluerequired="true" autosubmit="false" operator="AND">TroopCommand = '[value]'</value>

Do I need to use the URL addition:
?esearch=R1&slayer=0&exprnum=0&showdatagrid=true

thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stewart,

   Hmm... You have some syntax issues in your xml and I am not sure what you are actually trying to search for with what you have...

<expressions>
  <expression alias="Troop Command" textsearchlabel="Search Troop Command:" isvaluerequired="true">
    <values>
      <value prompt="Example: 153TC4" isvaluerequired="false" uniquevalsfromfield="TroopCommand" </value>
        <value prompt="Example: 153 TC" isvaluerequired="true" operator="AND">upper(TroopCommand) LIKE upper('%[value]%')</value>
        <value prompt="Example: 153 TC2" isvaluerequired="true" operator="AND">TroopCommand= '[value]'</value>
        <value prompt="Example: 153 TC3" uniquevalsfromfield="TroopCommand" isvaluerequired="true" autosubmit="false" operator="AND">TroopCommand = '[value]'</value>
    </values>
  </expression>
</expressions>


What you have now you are searching the same field 4 times using the and operator. Twice you use the uniquevalsfromfield attribute. Your First value tag is missing the right carrot before the closing tag for value.

As you seem pretty new to XML markup maybe you should explain what it is you are wanting to do in your configuration? What do you want to search for?
0 Kudos
StewartGalloway
Occasional Contributor
Robert,
Yes, I am struggling with XML.  I would like to query a list of military units based on criteria in the Troop Command field.  For example, select all units assigned to the 153rd Troop Command. The esearch window displays automatically and I get value choices from the field.

I have 4 searches because I did not know which one to use so I tried them all.

The result of a new layer is good (I�??d like to change the icon eventually.  Working with <resultslabel> <symbols>  <picturemarkersymbol> I think?).

Getting a result of a table I could print/download would be great too (Fixed Datagrid?).

Would it help if I uploaded data?

Thanks very much.
Stew
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stew,

   Zip up your eSearchWidget_2.xml and I will assist with the proper syntax.
0 Kudos
StewartGalloway
Occasional Contributor
thanks so much!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stew,

   What is the geometry type for this map service layer? I you want to get the results in the data grid you have to add each desired field to the fields parent element and not use fields all="true". So can you copy all the fields text from your rest service end point and attach that (just in case, the rest service end point is the data that is displayed in the browser when you put http://ngnya0-gis-02:6080/arcgis/rest/services/UNITS/Units_Map2/MapServer/0 in the address bar)?
0 Kudos
StewartGalloway
Occasional Contributor
Geometry type is point.  Please see attached for the fields text.
0 Kudos