Select to view content in your preferred language

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

707
3
10-14-2010 06:27 AM
AlexGray
Deactivated User
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_datag...

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-ple...

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=...

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..
0 Kudos
3 Replies
StephanieWidas
Occasional Contributor
Alex,
Did you ever get this figured out?  I'm having the same problem.  My find task is not returning any results when executed through the Javascript API (with the google extension).  I get results, however, when I run it from the REST services directory, but all of my results have that Feature ID: -1. 
Thanks,
Stephanie
0 Kudos
StephanieWidas
Occasional Contributor
Alex... or anyone else with similar problems with the find task - -

I posted a similar problem to the forum.  I ended up going to tech support with the issue.  You can go to my thread for more information:

http://forums.arcgis.com/threads/29274-Find-Task-on-XY-Event

Hope this helps,
~Stephanie
0 Kudos
HemingZhu
Frequent Contributor
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_datag...

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-ple...

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=...

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..


I looked your findTask url: http://arcxdev/ArcGIS/rest/services/contour/TestPoints/MapServer. on browser. I get this message: Service 'Planning/Planning_PAT' of type 'MapServer' does not exist or is inaccessible. Secondly, is your statement: findTask.execute(query,showResults); should be: findTask.execute(findParams,showResults);?
0 Kudos