How can I get distinct features from a feature service

557
1
09-12-2018 09:56 AM
KeithLarson1
MVP Alum

Hello all,

I have a QML app where I am sometimes using data from a live feature service, and other times using a geodatabase that is generated from that same service. I need to get some distinct values, but there are no options in QueryParameters to select distinct features, given that only the order by and where clause parts of the sql query can be modified. When I view the table in the feature service in a web browser, it has the "Return Distinct Values" option, but I don't seem to be able to access this from within my app. I could, of course, just iterate through the table and find the values myself, but this is very slow on a large table. I know when I am dealing with a .geodatabse file, I can run my own SQLite query on it, but I don't know any way around it when connected to the feature service.

Am I out of luck, or is there a way to access this functionality.

Thanks,

Keith

0 Kudos
1 Reply
LucasDanzinger
Esri Frequent Contributor

Hi Keith-

This is currently a limitation. I can add you to an internal list of interested customers. Could you message me some details about your company and project so I can get that info added? This helps us prioritize our backlog.

A possible workaround (but not ideal depending on what you're doing) with the distinct values is to directly make the REST call on your own.

-Lucas

0 Kudos