Select to view content in your preferred language

Seach Widget Error #1009

1203
2
07-21-2010 08:58 AM
ThomasFair
Deactivated User
I have added my own search option in addition to the default options as you can see below. When I try a search on my layer it returns the following error below. Please help.

Error #1009: Cannot access a property or method of a null object reference.

<?xml version="1.0" ?>
<configuration>
    <info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
    <layers>
        <layer>
            <name>Louisville Parcels</name>
            <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/M...</url>
            <expression>PARCELID = '[value]'</expression>
            <textsearchlabel>Search by Parcel ID  [ Example: 181001490000 ]:</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select incidents</graphicalsearchlabel>
            <fields>PARCELID</fields>
            <titlefield>PARCELID</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Louisville Police Facilities</name>
            <url>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/...</url>
            <expression>PD_NAME = '[value]'</expression>
            <textsearchlabel>Search Police Stations by name... [ Example: 2ND DIVISION ]</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select Police Stations</graphicalsearchlabel>
            <fields>PD_NAME,ADDRESS</fields>
            <titlefield>PD_NAME</titlefield>
            <linkfield></linkfield>
        </layer>
        <layer>
            <name>Telecom Sonet Nodes</name>
            <url>http://d152252/ArcGIS/rest/services/Telecom_Sonet/Telecom_Sonet/MapServer/1</url>
            <expression>MW_NUM='[value]'</expression>
            <textsearchlabel>Search Telecom Sonet Nodes by Name... [ Example: RECTOR ]</textsearchlabel>
            <graphicalsearchlabel>Use one of the graphical search tools to select Sonet Nodes</graphicalsearchlabel>
            <fields>MW_NUM</fields>
            <titlefield>MW_NUM</titlefield>
            <linkfield></linkfield>
        </layer>
    </layers>
    <zoomscale>5000</zoomscale>
</configuration>
Tags (2)
0 Kudos
2 Replies
EvanMarshall
Deactivated User
You might check to make sure there are no records with null geometries in your map service. For example, if you are using geocoded data, and are trying to query records that are unmatched, you will get this error 1009. You would have to add something like [YOUR ORIGINAL QUERY AND Status='M'] to exclude those.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Thomas,

   Also ensure that you do not have any MW_NUM's that are null in your data.
0 Kudos