Query for Distinct Values

5135
3
08-01-2011 09:49 AM
ClaytonDonahue
New Contributor
Hello All,

First post here in the forums! We're really just getting started with ArcServer, but I was wondering whether there is a way to return only distinct values when performing a query via the REST API. For instance, I have a layer containing ~50,000 features. I would like to return the distinct values for a particular field. If necessary, I could retrieve all the features, and then process the result in my web application. However, I would like to avoid this extra overhead.

Is there a way to accomplish this via the REST API? If not, how do people usually go about this - direct queries against the SDE tables?

Any help or suggestions would be appreciated - thank you!

Best Regards,
- Clayton
0 Kudos
3 Replies
SrinivasVinnakota
Esri Contributor
REST does not support querying DISTINCT values at 10.0 and prior releases.
0 Kudos
ClaytonDonahue
New Contributor
Hi Srinivas,

Thank you for your reply. You said that this feature is not available in 10.0 and prior releases ... does this mean that the "query distinct" behavior is expected to be available in the 10.1 release?

Thanks again,
- Clayton
0 Kudos
Noah-Sager
Esri Regular Contributor
Howdy,

The "returnDistinctValues�?� parameter of the Query task is now supported as of version 10.1 SP1.

More information can be found here:
http://resources.arcgis.com/en/help/rest/apiref/index.html


Regards,

-Noah
0 Kudos