agray7501

findtask query providing weird results.. Feature ID: -1

Discussion created by agray7501 on Oct 14, 2010
Latest reply on May 12, 2011 by hzhu
I have been using the sample findtask query to a datagrid http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/find_map_datagrid.html

And incorporated it into my js online map and its returning weird results..
http://www.co.frederick.va.us/planning/newmap1copy2.html

using the google javascript console... I get this message when I click on the search button
dojo.io.script.jsonp_dojoIoScript6._jsonpCallback({"error":{"code":500,"message":"Object reference not set to an instance of an object.","details":[]}});

I've asked this question on another forum and they have been very helpful in locating the error..
http://gis.stackexchange.com/questions/2447/why-is-my-findtask-not-working-correctly-can-someone-please-look-at-my-code-and/2449#2449

Running the find query from within the feature definition, I was shown, that I get a result but its returning a "Feature ID: -1".. That seems to be the problem.. Which still doesn't help me understand what  the problem actually is..
http://gis1.co.frederick.va.us/ArcGIS/rest/services/Planning/Planning_PAT/MapServer/find?searchText=54++++A++++25&contains=true&searchFields=PIN&sr=102113&layers=5&returnGeometry=true

Hoping someone can help explain to me more about what is going on and what I have to do to fix the problem.. I am going to see about getting the mapservice recreated and see if that fixes the problem. I tried the find query on a different mapservice in our organization and got the same results as well..

Outcomes