Enhanced-Search-Widget-for-FlexViewer Part III

116316
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
RobertScheitlin__GISP
MVP Emeritus
Julie and Dongxing,

  I found several issue with SubTypes when using Julies test data and those have been addressed in version 3.5.3 with will be available 10/22/13 or 10/23/13.
0 Kudos
HiranDias
New Contributor
Hiran,

   Sure this is possible if you are using the source code and understand development in Flex/Actionscript. How if you are really asking if I can provide the code, then you are going to be disappointed as my todo list is far to long right now.


Thanks Robert. We will do some research to implement this new capabilitie in e-search. We have a few flex developers here so we may take some time to do that, but if you say that is possible, we will do it.

Do you know any Widget that do something alike with what i asked ?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hiran,

   No currently there is no widget out there (that I am aware of) that allows for a manually entered extent to be searched with.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   New Version now available:

Version 3.5.3 - 10/22/2013
* Fixed issue With preload="minimized" and the dropdownlists.
* Fixed issue with SubTypes and Domains assigned to subtypes.
* Fixed issue with text qualify userlists and the 'all' option.
0 Kudos
DongxingMa
New Contributor II
Julie and Dongxing,

  I found several issue with SubTypes when using Julies test data and those have been addressed in version 3.5.3 with will be available 10/22/13 or 10/23/13.



Thank you very much for your help! But I still don't have the luck to enjoy the beauty of the widget yet. I still get the same error message when the subtype field is turned on, and one new issue comes up:

The Select Layer: pulldown listbox and field pulldown list box widths are both zero, and in the right side (supposed to be in left side), can't see the layer names or the field names.

Could you please tell me how can I fix the issues, or you have to change your source code!

Thanks,
Dongxing
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dongxing,

   If you do not have a height and width explicitly set in your main config.xml for the eSearchWidget then you need to add them.
<widget label="Enhanced Search" left="80" top="100" preload="open"
                icon="assets/images/i_search.png" height="250" width="400"
                config="widgets/eSearch/eSearchWidget.xml"
                url="widgets/eSearch/eSearchWidget.swf"/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Dongxing,

   Is it possible for you to provide a sample of your data in a File GDB for testing?
0 Kudos
JulieWilliams1
New Contributor
All,

   New Version now available:

Version 3.5.3 - 10/22/2013
* Fixed issue With preload="minimized" and the dropdownlists.
* Fixed issue with SubTypes and Domains assigned to subtypes.
* Fixed issue with text qualify userlists and the 'all' option.


Thanks, so much, Robert!  I really appreciate you taking the time to look at the domain issue!  We really, really love this tool and use it a lot in our maps.  I'll give the new version a try - thanks, again!

Julie Williams
0 Kudos
MatthewColwin
New Contributor
Robert -

I'm attempting to utilize the Enhanced Search Widget to meet a requirement for a class I'm in. I've published a map service with a points layer ("gamefish sites") that contains a number of different fields, the two of importance being gamefish_commonname (fish name) and gamefish_weight (average fish weight in grams). We are asked to allow the user to query for a user defined gamefish and the weight of that species greater than a user specified input.

Therefore, what I hoped to do was to alter the configuration file of the Enhanced Search Widget so that two options would be available to the user. First, they would be prompted to choose a fish name from a dropdown, and second, they would enter a number (weight), and then hit "search" to find gamefish sites that meet both requirements. In my code below (I've only posted the part I've edited), I was able to successfully get both of the dialogs (fish dropdown and weight numeric entry box) to appear, and I made it so the fish type was required but weight was not. If no weight is entered, the search works correctly. However, if a weight is entered, I get this error:

[RPC Fault faultString="Unable to complete operation." faultCode="400" faultDetail=""]

My current configuration file has two different views so the user can see these two search criteria. I'm very new to HTML and am unsure how to make it so the user MUST enter a fish type, and CAN enter a weight (if necessary, I can make the weight required as well) in order to get the proper results.

Any help you can provide would be GREATLY appreciated.


<configuration>
    <layers>
        <layer>
            <token/>
            <definitionexpression/>
            <enableexport>false</enableexport>
            <name>Gamefish Sites</name>
            <url>http://152.1.13.55/arcgis/rest/services/GEWA/GEWA_FishSamplingSites_Assignment19/MapServer/0</url>
            <expressions>
                <expression alias="Gamefish Search" textsearchlabel="Search by Common Name (and optionally also by average weight in grams):" isvaluerequired="true">
                    <values>
                        <value prompt="Example: Bluegill" uniquevalsfromfield="gamefish_commonname" isvaluerequired="true" autosubmit="false" operator="AND">gamefish_commonname = '[value]'</value>
      <value prompt="Example: 20" isvaluerequired="false" autosubmit="false" >gamefish_weight > '[value]</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Gamefish Sites</graphicalsearchlabel>
            <spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>Gamefish_Site</titlefield>
            <fields all="false">
    <field name="siteid" alias="Site ID" visible="true" sort="asc|1|string"/>
    <field name="description" alias="Site Description"/>
    <field name="x_coord" alias="X-Coordinate"/>
    <field name="y_coord" alias="Y-Coordinate"/>
    <field name="gamefish_sitevisitid" alias="Site Visit ID"/>
    <field name="gamefish_commonname" alias="Common Name"/>
    <field name="gamefish_latinname" alias="Latin Name"/>
    <field name="gamefish_monthvisited" alias="Month Visited"/>
    <field name="gamefish_yearvisited" alias="Year Visited"/>
    <field name="gamefish_datasheet" alias="Data Sheet"/>
    <field name="gamefish_weight" alias="Average Weight"/>
   </fields>
            <links/>
            <zoomscale usegeometry="true" zoompercent="1.2"/>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
            <symbology>
                <picturemarkersymbol url="assets/images/i_target.png" height="15" width="15" xoffset="0" yoffset="0"/>
            </symbology>
        </layer>
    </layers>
0 Kudos
DongxingMa
New Contributor II
Dongxing,

   Is it possible for you to provide a sample of your data in a File GDB for testing?


Thank you, Robert! I have uploaded our sample data, it's OtaySewertest.gdb.zip.

The widget layer box width issue is not a problem anymore, and the widget works for subtypes field and domain now, but--it's only when without joined tables associate with the layer! The new problem is like: if the layer has a joined table with it (the fields in my map service is like:

-----------------------------------------------------------------------------------------------------
ssGravityMain.OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID )
ssGravityMain.Subtype ( type: esriFieldTypeInteger , alias: Subtype )
ssGravityMain.FacilityID ( type: esriFieldTypeString , alias: FacilityID , length: 30 )
......
otaypub.dbo.vw_wASBUILTS_URL.SID ( type: esriFieldTypeInteger , alias: SID )
otaypub.dbo.vw_wASBUILTS_URL.AsBuiltNo ( type: esriFieldTypeString , alias: AsBuiltNo , length: 50 )
otaypub.dbo.vw_wASBUILTS_URL.ASBUILTURL ( type: esriFieldTypeString , alias: ASBUILTURL , length: 87 )

-----------------------------------------------------------------------------------------------------

then it can't search the layer anymore, even when the subtype field turned off (before it worked when subtype field turned off). The error is still the "400" error, same as before.

Here I attached our sample sewer datasets, please test the three layers and join the table: asbuiltTab to the layers by "asbuiltno" fields.

I really want to use the wonderful widget in our flex viewer, hope it won't cost you too much time to make it works for both subtype field (with domain), and the joined table and its fields. Please let me know if you need anything else for testing.

Really appreciate your help!

Dongxing
0 Kudos