Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

177402
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
AllisonKampbell
Regular Contributor
Hi Robert:  Thank you so much for addressing the definitionexpression and getting it done so fast.  Much appreciated!

Allison Kampbell
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
I am having a similar issue.  I search for a line feature, then go to the Spatial Search to select parcels with a given distance, but they are not listed in the drop-down.  I have the Parcel layer set to <spatialsearchlayer>true</spatialsearchlayer>.  Not sure what the issue is.  At first I thought the parcel layer wasn't on or at a visible scale, but that was not the case.





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
Derek,

   What version are you talking about? Can you post your eSearchWidget.xml?
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
3.5.3

attached xml



Derek,

   What version are you talking about? Can you post your eSearchWidget.xml?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

   It is just one of those small gotchas of Flex... Case Sensitivity. All the tags/elements and attributes in the eSearchWidget.xml are lower case.

<spatialSearchlayer>true</spatialSearchlayer>
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
Gotcha.  Thanks.

Question though: Has your code been changed since 3.5.3?  I did not change your source code to <spatialSearchlayer>true</spatialSearchlayer> from <spatialsearchlayer>true</spatialsearchlayer>



Derek,

   It is just one of those small gotchas of Flex... Case Sensitivity. All the tags/elements and attributes in the eSearchWidget.xml are lower case.

<spatialSearchlayer>true</spatialSearchlayer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Derek,

   Nope. It has been that way for MANY versions. Maybe you are just now noticing it.
0 Kudos
EricGardecki
Deactivated User
Robert,

This is more of an FYI for the future, as I'm sure this certainly isn't much of a priority since it's a browser-related issue.

I found that when using the datagrid print function (glad this was added btw, quite helpful) in Chrome, it seems to not cooperate when switching to landscape.  The data shown in the datagrid in my app extends more than the width of a portrait 8.5x11 and therfore creates a 2nd page.  If I change the print settings to landscape, all it does it rotate the data to match.  I found no way for this to print "correctly" in Chrome.  However, in IE it works great.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Eric,

When you say
If I change the print settings to landscape
How are you doing that as the print preview dialog shold not present you with that option? If I set the printers preferences in Windows to do landscape all the time and then print the datagrid it works fine in Chrome though.
0 Kudos
EricGardecki
Deactivated User
I had to use the "print using system dialog". 

I suppose changing the default to landscape prior to printing each time would work but that isn't something an end user would think to do.
0 Kudos