Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

190451
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
Joshua,

   Without customization to the widgets source code it will be very unlikely that you can configure the widget to work with the results from the geoprocessing widget.
0 Kudos
JoshuaFarrow
Deactivated User
Robert,

Thank you for your response.

I have successfully edited the Enhanced Search Widget in the past to search mapping applications where the layers were included on a REST service. In this instance, the geoprocessing results do not appear on the REST services site, within the Map or Feature Server, so I am unsure what URL to include in the ESW to search on.

Again, thank you for your help.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joshua,

   That is the exact issue. What the geoprocessing widget likely does is adds a feature layer to the map client side and thus does not have a url that could be used in the QueryTask.
0 Kudos
MatthewColwin
Emerging Contributor
How do I go about getting the dropdown for "Search Entities of:" populated? Right now, I have one layer on the Text Search tab and the user can pick one of the features within that layer from a dropdown populated using "uniquevalsfromfield". Then, I want them to be able to use the Spatial Search tab to be able to specify a buffer and choose a different layer (from a choice of two) and select any entities of that chosen layer that are within the buffer. Ideally, they would have the option to select "all" so that either of the two layers within the buffer are selected

Select instance of proposed linear project > Buffer linear project a specified distance > Select buildings, observation points, or both

Here is the code I have now that successfully creates the Text Search tab for proposed linear projects, and creates the Spatial Search tab but with only the proposed linear projects layer in the "Search Entities of" dropdown.

Thanks for any help you can provide.

        <layer>
            <token/>
            <definitionexpression/>
            <enableexport>true</enableexport>
            <name>Proposed Project Search</name>
            <url>http://152.1.13.55/arcgis/rest/services/NERI/GIS550_Midterm_FeatureService_V1/MapServer/2</url>
            <expressions>
                <expression alias="Proposed Project Search"  isvaluerequired="true">
                    <values>
                        <value prompt="Choose a Project - Example: test1" uniquevalsfromfield="project_name" isvaluerequired="true" autosubmit="false" operator="AND">project_name = '[value]'</value>

                    </values>
                </expression>
            </expressions>
            <graphicalsearchlabel>Use one of the graphical search tools to select Proposed Project</graphicalsearchlabel>
            <spatialsearchlayer>true</spatialsearchlayer>
            <titlefield>Proposed_Project</titlefield>
            <fields all="false">
    <field name="project_name" alias="PROJECT NAME" visible="true"/>
   </fields>
            <links/>
            <zoomscale usegeometry="true" zoompercent="1.2"/>
            <autoopendatagrid>true</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
            <symbology>
                <picturemarkersymbol url="assets/images/i_target.png" height="18" width="18" xoffset="0" yoffset="0"/>
            </symbology>
        </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Matthew,

   So you need to add the other two layer that you want to be able to search on using the spatial search like you did for the layer you attached. If you do not want those layers to appear in the text search then do not specify an expression but they must have the
 <spatialsearchlayer>true</spatialsearchlayer> 
There is no current capability to have it search both layers at the same time.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   a new version has been released

   Version 3.5.4 - 11/5/2013
* Fixed issue With dropdownlists sizes that was introduce in 3.5.3.
0 Kudos
SimonMorgan
Frequent Contributor
Using FlexViewer 3.4 with eSearch 3.4

I cannot get the following query to yield results:

<values>
      <value prompt="Species e.g. AC RU">maximo_production.dbo.GIS_Balances.speciescode = '[value]'</value>
      <value prompt="Height e.g. 8" isvaluerequired="false" operator="AND">maximo_production.dbo.GIS_Height.height &gt;= [value]</value>
      <value prompt="Diameter e.g. 2"  operator="AND" isvaluerequired="false">maximo_production.dbo.GIS_Diameter.diameter &gt;= [value]</value>-->
     </values>


When I try the following query in ArcGIS Desktop, I yield 3 results:

maximo_production.dbo.GIS_Balances.speciescode = 'AC SA' AND 
"maximo_production.dbo.GIS_Height.height" >= 5


Any suggestions?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Simon,

   Maybe this is just a type but what is the end comment doing in here (what I have in red)?

                    <values>
                        <value prompt="Species e.g. AC RU">maximo_production.dbo.GIS_Balances.speciescode = '[value]'</value>
                        <value prompt="Height e.g. 8" isvaluerequired="false" operator="AND">maximo_production.dbo.GIS_Height.height &gt;= [value]</value>
                        <value prompt="Diameter e.g. 2"  operator="AND" isvaluerequired="false">maximo_production.dbo.GIS_Diameter.diameter &gt;= [value]</value>-->
                    </values>
0 Kudos
SimonMorgan
Frequent Contributor
Simon, 

Maybe this is just a type but what is the end comment doing in here (what I have in red)? 

                    <values>
                        <value prompt="Species e.g. AC RU">maximo_production.dbo.GIS_Balances.speciescode = '[value]'</value>
                        <value prompt="Height e.g. 8" isvaluerequired="false" operator="AND">maximo_production.dbo.GIS_Height.height &gt;= [value]</value>
                        <value prompt="Diameter e.g. 2"  operator="AND" isvaluerequired="false">maximo_production.dbo.GIS_Diameter.diameter &gt;= [value]</value>-->
                    </values>


That was left over from when I commented the diameter line to see if that was causing the problem. I cleaned it up and I am still having an issue.

Attached is my full config (note that this is on dev server hence all the commented lines), let me know if you would like access to the map service and I will generate a token.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Simon,

   Does the (simpler) "Row search" work?
0 Kudos