Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

177507
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
Marie,

   Yes you should always use your own geometry service as esris gets a lot of traffic. Changing the spatialreference will depend on what spatialreference your basemaps are in. If you are using esris basemaps then NO. If you are using all of your own basemaps and they are in WKID 3418 then yes.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ben,

   Thanks for letting me know. I will fix the example eSearchWidget.xml in the download ASAP.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Patrick,

   That is a side affect of the new version using a FeatureLayer and not a graphics layer as the results of as it inheriets the scale dependency of the layer from the server. I will look at make the scale dependency configurable in the next version.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   New Version available

Version 3.3.2 - 5/15/2013
* Added textqualifier tag for defining the character that will be used in the export datagrid to signify that the
field contents are a string to programs like Excel®.
* Added removeserchlayersminmaxscale tag that specifies whether or not to remove the
MinScale and MaxScale of the layer that is set on the particular layer from ArcGIS Server.
0 Kudos
PatrickWalker
New Contributor
Robert,
I have implemented your new eSearch version 3.3.2 update and it has taken care of allowing the display of the returned search results at any scale.  Thank you for the quick update to this widget, and as always, your awesome support for all of us.  Great job.
0 Kudos
AngieAllison
Emerging Contributor
Marie,

   Yes you should always use your own geometry service as esris gets a lot of traffic. Changing the spatialreference will depend on what spatialreference your basemaps are in. If you are using esris basemaps then NO. If you are using all of your own basemaps and they are in WKID 3418 then yes.


Thanks for the info.  I am up and running now. Aside from the zoom to layer as Patrick talked about.  Thanks for this wonderfull widget.  The end users will love being able to create there own "reports".
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marie,

   If you notice post #68 That issue is fixed in version 3.3.2.
0 Kudos
CaseyMcMillin
Emerging Contributor
Robert,

I was able to narrow it down to having multiple relates on one layer.  Your corrections fixed the test environment I sent you and if I remove the second relate in my production environment it fixes that as well.  With two relates on the same layer, I am still having the same issue.  Here is the layer config with two relates:

  <layer>
            <token/>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>Sanitary Main</name>
            <url>http://GIS01.lebanon.local:6080/arcgis/rest/services/OperationalLayers/Utilities/MapServer/3</url>
            <expressions>
                <expression alias="Facility ID" textsearchlabel="Search Specific Main:" isvaluerequired="false">
                    <values>
                        <value prompt="Example: 1032" isvaluerequired="false">FACILITYID = [value]</value>
                    </values>
                </expression>
    <expression alias="Attributes" textsearchlabel="Search Mains:" isvaluerequired="false">
                    <values>
                        <value prompt="Type:" isvaluerequired="false" uniquevalsfromfield="TYPE" autosubmit="false" operator="AND">TYPE = '[value]'</value>
      <value prompt="Diameter:" isvaluerequired="false" uniquevalsfromfield="DIAMETER" autosubmit="false" operator="AND">DIAMETER = [value]</value>
      <value prompt="Material:" isvaluerequired="false" uniquevalsfromfield="MATERIAL" autosubmit="false" operator="AND">MATERIAL = '[value]'</value>
                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Main</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>Sanitary Main</titlefield>
            <fields all="false">
                <field name="FACILITYID" gridfield="true"/>
                <field name="TYPE" gridfield="true"/>
                <field name="DIAMETER" gridfield="true"/>
                <field name="MATERIAL" gridfield="true"/>
                <field name="YEARBUILT" gridfield="true"/>
                <field name="EDITDATE" gridfield="true"/>
                <field name="INSPECTIONDATE" gridfield="true"/>
            </fields>
            <links/>
   <zoomscale usegeometry="true" zoompercent="2"/>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates>
    <relate id="0" label="Asbuilts" enableprintgrid="false">
     <fields all="false">
      <field name="ASBUILTID" gridfieldonly="true"/>
      <field name="FILEPATH" alias="View Asbuilt" gridfieldonly="true" hyperlinkgridfield="true" hyperlinkaliastext="View Asbuilt" linkprefix="http://GIS01/Asbuilts/" linksuffix=".pdf"/>
     </fields>
     <zoomscale usegeometry="true" zoompercent="1.6" />
    </relate>
    <relate id="1" label="TV Projects" enableprintgrid="false">
     <fields all="false">
      <field name="TVPROJECT" gridfieldonly="true" hyperlinkgridfield="true" hyperlinkaliastext="View TV Project" linkprefix="http://GIS01/TVProjects/"/>
     </fields>
     <zoomscale usegeometry="true" zoompercent="1.6" />
    </relate>
   </relates>
            <symbology>
                <simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>                
            </symbology>
        </layer>

Thanks again for all the help and corrections.


Casey,

   I was able to debug using the data you provided and narrow it down to the two main issues I told you about in my last post.  The zoom scale I provided in red and removing the polygon symbology tags or better yet changing them to the proper polyline symbology:

            <symbology>
                <simplelinesymbol color="0x00ff00" alpha="0.8" width="2" />
            </symbology>


Fixed the issues for me. Can you try publishing the same data you sent me and configure it and see if you can get the same positive results I am getting? That way we can narrow things down more.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Casey,

   I am unable to test using the data you sent earlier as the second relate is not there. Can you sent all the data for the new test case?
0 Kudos
KarenHolt
Emerging Contributor
Hi Rob,

I have two questions.

1. I noticed that when my client ported their data into SQL ArcGIS 10.11 that my eSearch stopped working. I have spend the past few days upgrading to 3.3 and trying to get things to work. I have now narrowed down the problem to REST but wanted to know if you had any insight. I have full URL's below.

The query works fine when I use the following SQL statement:
(DATE_ >= '01/01/2008') AND (DATE_ <= '01/01/2009') AND (LABEL like 'COLORADO')


When I switch the order of the SQL statement I get an error - "The specified URL can't be found"
(LABEL like 'COLORADO') AND (DATE_ >= '01/01/2008') AND (DATE_ <= '01/01/2009')

2. Also, how do I display the date in a readable format in the grid?

Thanks,
Karen

This Works:
http://gis.fws.gov/arcgis/rest/services/FWS_FishIdentify/MapServer/0/query?where=%28DATE_+%3E%3D+%27...

This does NOT work:
http://gis.fws.gov/arcgis/rest/services/FWS_FishIdentify/MapServer/0/query?where=%28LABEL+like+%27CO...
0 Kudos