student_88

AGSFindTask with table

Discussion created by student_88 on Jun 4, 2011
Good morning everybody

I am facing a problem and I spent long time trying to find a solution for it but I couldn't. I hope that one of you can direct me to the right way.

I published a map service that contain one layer representing buildings (polygon feature class) and 2 tables: Owner table and own table that represent the relationship between building layer and owner table.

Now I want to perform AGSFindTask on "Owner" Table by searching about an owner , given his/her name.

//set find task parameters
self.findParams.contains = YES;
self.findParams.layerIds = [NSArray arrayWithObjects:@"2",nil];
self.findParams.returnGeometry = NO;
self.findParams.searchFields = [NSArray arrayWithObjects:@"Name",nil];
self.findParams.searchText = self.searchBar.text;
 
but when I run it , it give me an error (error:400 , unable to complete operation)

Notice that when I use the same code for searching about a building in building layer (which is layer zero), it gives me a correct result!!!!

So, does AGSFindTask really support searching it tables published as part of a map service???
How can I resolve this issue?!?!?




----------------------------------------------------------------------------
This is my service:
myMap/Building_owner (MapServer)

View In:   ArcMap   ArcGIS Explorer   ArcGIS JavaScript   Google Earth   ArcGIS.com Map

View Footprint In:   Google Earth

Service Description:

Map Name: Layers

All Layers and Tables

Layers:

Building (0)
Tables:

Own (1)
Owner (2)
Description:

Copyright Text:

Spatial Reference: 20439

Single Fused Map Cache: false

Intial Extent:
XMin: 458900.559415001
YMin: 897729.320265002
XMax: 459780.521685
YMax: 898349.875034999
Spatial Reference: 20439
Full Extent:
XMin: 458900.559415001
YMin: 897729.320265002
XMax: 459780.521685
YMax: 898349.875034999
Spatial Reference: 20439
Units: esriMeters

Supported Image Format Types: PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP

Document Info:

Title:
Author:
Comments:
Subject:
Category:
Keywords:
Credits:
Supported Interfaces:   REST   SOAP

Supported Operations:   Export Map   Identify   Find   Generate KML
----------------------------------------------------------------------------


Thanks in advance

Outcomes