Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part III

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

   The fact that your data has 2" the double quote is throwing excel for a loop... Normally the " is used as a text qualifier and the fact that your data looks like "2"","26007887", etc, etc it is an issue for excel. In excel if you set the Text Qualifier to none than you will see how it is suppose to work minus the double qoutes wrapping each column.
0 Kudos
HudsonSmith
Emerging Contributor
Robert,

Okay I realized it works when I <fields all="false> and then specify my specific fields but I would like all fields to display in the results. Here is my code for this part. Let me know if you see something wrong. Thank you.
<spatialsearchlayer>false</spatialsearchlayer>
            <titlefield>ZONING_NAME</titlefield>
            <fields all="true"/>
            <links/>
            <zoomscale usegeometry="true" zoompercent="2"/>
            <autoopendatagrid>false</autoopendatagrid>
            <queryattachments>false</queryattachments>
            <relates/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hudson,

   You can not do it that way. If you want field in the datagrid then you have to define them in the XML.
0 Kudos
HudsonSmith
Emerging Contributor
Robert,

Alright I understand Thank you for your help!
0 Kudos
CaseyMcMillin
Emerging Contributor
Casey,

   OK, finally I am able to see your configuration issue. I am expecting a zoomscale tag in your relate tag. As indicated in red below and you need to remove or change the symbology tag you have (which is now for a Polygon and your layer is a PolyLine), Your FacilityID field is a numeric field so your expression should not wrap the [value] in single quotes (which is the way you do for strings). The same goes for your Diameter field expression. It is normally little attention to detail things like this that trip people up. In the Next version I will do some better error traping for things like the missing zoomscale tag.

        <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">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" />
                        <field name="FILEPATH" hyperlinkgridfield="true" hyperlinkaliastext="View Asbuilt" linkprefix="http://GIS01/Asbuilts/" linksuffix=".pdf" />
                    </fields>
                    <zoomscale usegeometry="true" zoompercent="1.6" />
                </relate>
            </relates>
            <symbology>
                <simplefillsymbol color="0xff0000" alpha="0.5">
                    <outline color="0xff0000" alpha="0.8" width="2"/>
                </simplefillsymbol>
            </symbology>
        </layer> 


Robert,
Thank you very much for your assistance.  You have already gone above and beyond trying to help with the relationship errors I am having.  I made the changes you listed, but interacting with the fixed data grid still causes errors.  I think we are on the right track with the relate zoom scale, but I have tried multiple values there and nothing seems to change the result.
Thanks,
Casey
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
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
AngieAllison
Emerging Contributor
Marie,

   The fact that your data has 2" the double quote is throwing excel for a loop... Normally the " is used as a text qualifier and the fact that your data looks like "2"","26007887", etc, etc it is an issue for excel. In excel if you set the Text Qualifier to none than you will see how it is suppose to work minus the double qoutes wrapping each column.


ok thank you for all your hard work on these widgets
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marie,

   In the next release you will be able to specify the Text Qualifier in the eSearchWidget.xml and this would allow you to use a single quote instead of a double and that would help for your data having the double quote in it for inches.
0 Kudos
BenScott1
Deactivated User
Hi,

I am trying to configure a search on three fields. It seems that whatever I set 'isvaluerequired' to (true or false), a value must be entered in every text box before the search button is enabled and every box has a red asterisk indicating value required.

In the 'Road Name and Zip Code' search in the example viewer, which is similar to the search I am trying to configure, it is possible to search after entering a value in only one of the three boxes.

Am I changing the correct config item? I have tried setting 'isvaluerequired'=false at both the expression and value level but with no change.

Relevant config text below.

Cheers, Ben.

           <expressions>
                <expression alias="Lot, Section and Plan" isValueRequired="false" textsearchlabel="Enter any combination of Lot, Section and/or Plan number">
                    <values>
                        <value prompt="Example: 1" isValueRequired="false">upper(lotnumber) like upper('%[value]%')</value>
                        <value prompt="Example: A" isValueRequired="false" operator="AND">upper(sectionnumber) like upper('%[value]%')</value>
                        <value prompt="Example: 36201" isValueRequired="false" operator="AND">plannumber = [value]</value>
                    </values>
                </expression>
            </expressions>
0 Kudos
sofialoulad
Emerging Contributor
when i add the url to showdatagrid i get error #1010
😞
0 Kudos