Find task on table layer in AGSDynamicMapService

823
3
09-22-2011 03:18 PM
RobertMartin2
Occasional Contributor II
Hello,

I am trying to execute a find task on a table layer in an AGSDynamicMapService. I know the layer is running properly because I can query it without issue. When I try to run the find task, however, I get this error:

Error: Error Domain=NSCocoaErrorDomain Code=400 "Unable to complete  operation." UserInfo=0x6371fb0 {NSLocalizedFailureReason=Error, NSURL=[theURL]/MapServer/find?returnGeometry=false&contains=true&layers=180&searchFields=NAME_T&searchText=[theSearchText]&f=json, NSLocalizedDescription=Unable to complete  operation.}


I tried pasting that URL into my browser and I got Error 400: Unable to complete operation, but couldn't find any more info in the server documentation. Does anyone know what might be causing this? Is there something that has to be enabled when the service is published?


Thank you,
Robert
0 Kudos
3 Replies
NimeshJarecha
Esri Regular Contributor
Robert,

The find operation is not supported on tables by ArcGIS Server REST API (as you verified URL in the browser). Hence, you won't be able to get AGSFindTask to work with tables.

Hope this helps!

Regards,
Nimesh
0 Kudos
RobertMartin2
Occasional Contributor II
Hi Nimesh,

Thank you for the response. I'm just little confused -- in the class reference for AGSFindTask it says:

This task performs text-based searches on an ArcGIS Server map service. The search can include both layers and tables in the map service.


So shouldn't the find task work here?


Thanks again,
Robert
0 Kudos
NimeshJarecha
Esri Regular Contributor
Sorry for confusion. The class reference doc will be updated mentioning that only text based search on layers are supported.

Regards,
Nimesh
0 Kudos