Select to view content in your preferred language

Search Widget

2114
9
10-25-2010 11:28 AM
JoshuaCoates
Deactivated User
I am having an issue with my Search Widget. I used the exact xml from the search widget I had been using from my beta flex app. I just copied and pasted it into the new wearchwidget.xml. However, when I perform a search, for an address as an example, it will find results....however the results do not show the attribute text in each result box. Instead each results box is blank....when I click one of the records found....it navigates to the result....and shows the binocular symbol on the address point....but the open dialog box that is suppose to show the attribute info is blank as well?! Any idea??? Below is my SearchWidget.xml

<?xml version="1.0" ?>
<configuration>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
    <layers>
        <layer>
            <name>Search by Address</name>
            <url>http://publicgis/PublicGISserver/rest/services/Basemap/MapServer/0</url>
            <expression>Address LIKE'%[value]%'</expression>
            <textsearchlabel>Search by Address  [ Example: 115 W Cherokee Ave ]:</textsearchlabel>
            <graphicalsearchlabel></graphicalsearchlabel>
            <fields>ADDRESS,STREET NO,STREET,CITY,STATE,ZIP,OWNERLAST,OWNERFIRST</fields>
            <titlefield>ADDRESS</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Search by FIRM ID#</name>
            <url>http://publicgis/PublicGISserver/rest/services/2007_BartowFloodplain/MapServer/0</url>
            <expression>PANEL ='[value]'</expression>
            <textsearchlabel>Search FIRM Panel by Panel # [ Example: 0240 ]</textsearchlabel>
            <graphicalsearchlabel></graphicalsearchlabel>
            <fields>PANEL,FIRM_ID,FIRM_PAN</fields>
            <titlefield>PANEL</titlefield>
            <linkfield></linkfield>
        </layer>
    </layers>
    <zoomscale>5000</zoomscale>
</configuration>
Tags (2)
0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus
Joshua,

   The config xml for the search widget has changed the field element looks like this now

<fields all="false">
                <field name="PD_NAME"/>
                <field name="ADDRESS" alias="Address"/>
            </fields>
0 Kudos
JoshuaCoates
Deactivated User
Can you please elaborate a little more, are you talking about where
<fields>{desired attribute fields you want listed}</fields>
to change that to
<fields all="false">
                <field name="PD_NAME"/>
                <field name="ADDRESS" alias="Address"/>
            </fields>
???
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Yep that it exactly. All you need to do is look at the example "SearchWidget_Louisville.xml" that came with the flexviewer to see how it is suppose to be now.
0 Kudos
JoshuaCoates
Deactivated User
As always, thank you a million!
0 Kudos
JoshuaCoates
Deactivated User
Ok well I made the changes, and it is still acting the same. The results boxes are not showing attribute info. It shows the results, but nothing next to them and when I click on a result, it zooms to the found result and there is an empty box with no attribute info?! I have even tried changing the <fields all="true"> to <fields all="false">....nothing happens and it just acts the same as before?!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joshua,

   Make sure you clear your browser cache so that you are sure that you are using the new xml.
0 Kudos
JoshuaCoates
Deactivated User
I cleared the browser cache before, it is not working at all now. When I click the search widget, I get an error code:200 can not decode.....?? Here is my xml for search widget...

<?xml version="1.0" ?>
<configuration>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
    <layers>
        <layer>
            <name>Search by Address</name>
            <url>http://publicgis/PublicGISserver/rest/services/Basemap/MapServer/0</url>
            <expression>Address LIKE'%[value]%'</expression>
            <textsearchlabel>Search by Address  [ Example: 115 W Cherokee Ave ]:</textsearchlabel>
            <graphicalsearchlabel></graphicalsearchlabel>
            <fields all="false">
                <field name="ADDRESS"/>
                <field name="STREET NO"/>
                <field name="STREET"/>
                <field name="CITY
                <field name="STATE"/>
                <field name="ZIP"/>
                <field name="OWNERLAST"/>
                <field name="OWNERFIRST"/>
            </fields>
            <titlefield>ADDRESS</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Search by FIRM ID#</name>
            <url>http://publicgis/PublicGISserver/rest/services/2007_BartowFloodplain/MapServer/0</url>
            <expression>PANEL ='[value]'</expression>
            <textsearchlabel>Search FIRM Panel by Panel # [ Example: 0240 ]</textsearchlabel>
            <graphicalsearchlabel></graphicalsearchlabel>
            <fields>PANEL,FIRM_ID,FIRM_PAN</fields>
            <titlefield>PANEL</titlefield>
            <linkfield></linkfield>
        </layer>
    </layers>
    <zoomscale>5000</zoomscale>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Joshua,

   You need to closely examine your entries.

<field name="CITY

in this line you are missing the ending double quote backslash and right carret.
it should be:
<field name="CITY"/>
0 Kudos
JoshuaCoates
Deactivated User
I apologize for my lack of observation, and thank you for your help. Everything works fine now:)


Thanks,
Josh C.
0 Kudos