Select to view content in your preferred language

Limit Identify fields results

1226
2
02-02-2011 01:04 PM
AngelGonzalez
Frequent Contributor
I am able to get the Identify sample in the SDK to work in my app. but I notice that it returns all of the fields in the layer.  Is it possible to have it return only the fields that are set to be visible within the mxd? I know that you can "remove" a field from the Identify results but when you are working with multiple layers removing all of the fields can become time consuming. Basically I want the Identify tool to mirror the fields that are visible for each layer within my mxd.
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Have you tried running the same query through your web browser?

For example this:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer/0/q...

Do you get the same fields returned regardless if the field property is not checked to be visible?
0 Kudos
AngelGonzalez
Frequent Contributor
Thanks for the update but I found my mistake. Even though I setup the mxd correctly and reference the correct mapservice in the xaml I forgot to reference the correct mapservice in the code behind (IdentifyTask). Once corrected it worked as expected. I forgot about the ability to run a query thru the web browser. Need to remember that for the future.

Thanks Again.
0 Kudos