AnsweredAssumed Answered

Retrieve Unique Values from feature layers

Question asked by ryansmith52 on May 7, 2015
Latest reply on Jun 6, 2016 by dougbrowning

Hi Guys, i need to retrieve unique values from a set of feature layers. I've been using the following example as a guideline - Using JavaScript to populate a ComboBox with unique values | ArcGIS Blog but my problem as noted in that article is that the records i have is over 500, 2500 to be exact. I came across a certain "returnDistinctValues" property from the Query API Reference - Query | API Reference | ArcGIS API for JavaScript which if set to true will return distinct Values of the specified outfields of the query. I haven't tried out as yet since it requires "supportsAdvancedQueries" property of the feature layer to be set to true and the current configuration has it set to false. 

I do recognize that changing the maxRecord of the feature layer could severely hamper the performance, so the only other option i can think of using the queryIds method of the feature layer?

Please advise as to which approach i should take to overcome this issue.