Show Find Task results in DataGrid not displaying

788
2
Jump to solution
09-10-2012 07:45 AM
DavidMcGill
New Contributor
I am trying to get the Find Task to display the earthquakes in a specific region.
Here is the sample code for the Show Find Task results in a DataGrid:
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/find_map_datag...

I am not sure if there is a conflict between the Identify Task vs. Find Task or if the (results) sequence in the code is not loading properly.

I have a search function on the right side of my map for the Earthquake Region Search...
and here is my jsfiddle.net link to my application:
http://jsfiddle.net/UtJDv/

any help is greatly appreciated.
Thanks,
David
0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Frequent Contributor
I played with this a little bit and the first error was that you had "Symbol" in your showResults method instead of "symbol", but the ESRI earthquake service doesn't work the way as expected with the Find Task.
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/Map...

Warning - lots of guessing ahead
Use the Find method in that REST page and you'll see it returns no attribute or geometry results. I'm guessing it's an event layer in the service generated from a table/rss feed and not an actual shapefile/featureclass. Again, I'm guessing the Find Task doesn't pull the data you expect from a service generated this way. However, when I use the Query Task to pull the data, geometry and attributes are returned, so that may be an alternative. Not as robust as the find task, but usable.

Also, in the future you may want to simplify your demo for questions to help narrow down the errors.

Hope that helps a little.

View solution in original post

0 Kudos
2 Replies
ReneRubalcava
Frequent Contributor
I played with this a little bit and the first error was that you had "Symbol" in your showResults method instead of "symbol", but the ESRI earthquake service doesn't work the way as expected with the Find Task.
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/Map...

Warning - lots of guessing ahead
Use the Find method in that REST page and you'll see it returns no attribute or geometry results. I'm guessing it's an event layer in the service generated from a table/rss feed and not an actual shapefile/featureclass. Again, I'm guessing the Find Task doesn't pull the data you expect from a service generated this way. However, when I use the Query Task to pull the data, geometry and attributes are returned, so that may be an alternative. Not as robust as the find task, but usable.

Also, in the future you may want to simplify your demo for questions to help narrow down the errors.

Hope that helps a little.
0 Kudos
DavidMcGill
New Contributor
Thanks for the quick reply.

I replaced the ESRI sample layers with our Company layers, and everything appears to be working correctly now.



thanks again
David
0 Kudos