<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: returnDistinctValues not working in my query in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80054#M7331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since I want to look at all records, I used query.where = '1=1'.&amp;nbsp; It doesn't make a difference.&amp;nbsp; Generally if there's something very wrong with the query clause it won't execute at all.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got that syntax from another thread.&amp;nbsp; I realize it might be something different, depending on the geodatabase format.&amp;nbsp; This happens to be a file geodatabase.&amp;nbsp; 1=1 should do work, though, no matter the format. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2015 18:11:17 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2015-08-26T18:11:17Z</dc:date>
    <item>
      <title>returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80052#M7329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a queryTask based on the URL of my featureLayer.&amp;nbsp; This layer has 508 features in this layer.&amp;nbsp; My maximum record count on my service is much higher than that, to accommodate another layer with more features in it.&amp;nbsp; I'm using AGS 10.2.2 and Advanced Query Support says 'true'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this queryTask as the source for a dropdown list, so I need to get just the distinct values from my AgencyAcronym field.&amp;nbsp; My queryTask executes, but instead of the 18 distinct values for this field, I'm still getting 508 features returned.&amp;nbsp; I'm having to run these through another function to remove the duplicates and I don't think I should have to do this.&amp;nbsp; I've tried a where clause of '1=1', because I want to check all records, but that doesn't make a difference, I still get all 508 features. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my queryTask set up as:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; //populates the pick list searching state facilities by agency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; populateBuildingList: function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.buildingAgencyList.length = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask2 = new QueryTask(app.buildingLayer.url);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "AgencyAcronym is not null";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = ["AgencyAcronym"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.orderByFields = ["AgencyAcronym"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnDistinctValues = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(queryTask2, 'error', function(err){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('error populating building list: ' + err.error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask2.execute(query, lang.hitch(this, updateBGridHandler));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function updateBGridHandler(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('results of updateBGridHandler :' + results.features.length + " records" );&amp;nbsp; //all 508 records returned. 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrayUtils.forEach(results.features, function(feature){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var agencyName = feature.attributes.AgencyAcronym;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; agencyName = agencyName.replace(/^\s+|\s+$/g,'');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.buildingAgencyList.push(agencyName);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.buildingAgencyList.sort();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sortedList = common.sortAndRemoveDuplicates(app.buildingAgencyList);&amp;nbsp; //a function I'm having to use because the values aren't unique
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var data = arrayUtils.map(sortedList, function(itm, idx){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "id": idx,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": itm,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "value": itm
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var currentMemory = new Memory({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data: data,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; idProperty: 'id'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.agencyDropdown.set("store", currentMemory);&amp;nbsp; //a grid created earlier
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.agencyDropdown.sort('name');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80052#M7329</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2021-12-10T23:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80053#M7330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What permutations of your where clause have you tried?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shouldn't it be more like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt; query.where = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;"AgencyAcronym &amp;lt;&amp;gt; null"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 17:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80053#M7330</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-08-26T17:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80054#M7331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since I want to look at all records, I used query.where = '1=1'.&amp;nbsp; It doesn't make a difference.&amp;nbsp; Generally if there's something very wrong with the query clause it won't execute at all.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got that syntax from another thread.&amp;nbsp; I realize it might be something different, depending on the geodatabase format.&amp;nbsp; This happens to be a file geodatabase.&amp;nbsp; 1=1 should do work, though, no matter the format. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 18:11:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80054#M7331</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-26T18:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80055#M7332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Consider the lone source but &lt;A href="http://gis.stackexchange.com/questions/19383/select-distinct-values-from-a-single-column-of-an-attribute-table-or-layer"&gt;this discussion&lt;/A&gt; has a comment saying distinct isn't supported in FileGeoDbs. Maybe it needs to be in an SDE database?...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 18:19:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80055#M7332</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-08-26T18:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80056#M7333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually in production it will be an XY event from a SQL Server business application.&amp;nbsp; There's nothing in the JS API documentation that mentions the type of data source it has to be.&amp;nbsp; It's happening at the service, though, because I can try a query from the REST endpoint and it doesn't work properly there either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I'll have to keep my 'removeDuplicates' function after all.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 18:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80056#M7333</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-26T18:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80057#M7334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try the callback mentioned in this &lt;A _jive_internal="true" href="https://community.esri.com/message/399182#399182"&gt;discussion&lt;/A&gt;? That said, what this properly added to the API, &lt;A href="https://community.esri.com/migrated-users/2525"&gt;Kelly Hutchins&lt;/A&gt;​?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 19:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80057#M7334</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-08-26T19:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80058#M7335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, because Kelly said it was on the list for the next release (3.11 at that writing).&amp;nbsp; I'm sure it's now fixed.&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should have mentioned, if I didn't already, this is a secure service.&amp;nbsp; I'm not sure if this will work, because ioArgs.url is always going to have a token on the end and it's not going to match the original url of my featureLayer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; populateBuildingList: function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriRequest.setRequestPreCallback(function(ioArgs){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("ioArgs.url: " + ioArgs.url);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(ioArgs.url === "../../proxy/proxy.ashx?"+app.buildingLayer.url+"/query"){&amp;nbsp; //never resolves to true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioArgs.content.returnDistinctValues = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ioArgs;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.buildingAgencyList.length = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask2 = new QueryTask(app.buildingLayer.url);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 19:38:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80058#M7335</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-26T19:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80059#M7336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed it to &lt;/P&gt;&lt;P&gt;var urlPos = ioArgs.url.search(app.buildingLayer.url+"/query");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (urlPos &amp;gt; 0) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; if(ioArgs.url === "../../proxy/proxy.ashx?"+app.buildingLayer.url+"/query"){&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioArgs.content.returnDistinctValues = true;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ioArgs;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least now it's finding where I'm querying that url, but now there's no results to my query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 19:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80059#M7336</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-26T19:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80060#M7337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it was added at 3.11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/query-amd.html#returndistinctvalues" title="https://developers.arcgis.com/javascript/jsapi/query-amd.html#returndistinctvalues"&gt;Query | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2015 22:35:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80060#M7337</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-08-26T22:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80061#M7338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe it is working correctly with secure services.&amp;nbsp; I will make a more simple test and see if my theory is correct.&amp;nbsp; It might be a bug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 13:09:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80061#M7338</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-27T13:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80062#M7339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is a bug.&amp;nbsp; When I change my code to use a non-secured service, both orderByFields and returnDistictValues works just fine.&amp;nbsp; With secure services, running through a proxy etc, neither one of these work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2525"&gt;Kelly Hutchins&lt;/A&gt;ate this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 13:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80062#M7339</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-27T13:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80063#M7340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4289"&gt;Tracy Schloss&lt;/A&gt;​ it looks like you are still using the workaround of setPreRequestCallback. That workaround is no longer required at version 3.11 of the api and later. Can you try using the query's returnDistinctValues and see if that resolves the issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/query-amd.html#returndistinctvalues" title="https://developers.arcgis.com/javascript/jsapi/query-amd.html#returndistinctvalues"&gt;Query | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 16:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80063#M7340</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-08-27T16:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80064#M7341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a version that didn't have it, and that didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There must be something in particular about this service.&amp;nbsp; I tried another service that I've had for a while, making a secure version of it.&amp;nbsp; I was able to generate a list of distinct values without any problem from it.&amp;nbsp; It is based on a SQL server geodatabase, where my initial service is a file geodatabase.&amp;nbsp; I haven't read any limitations about that, except from an older thread that may or may not have any bearing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem service doesn't return distinct values through the REST endpoint either.&amp;nbsp; Of course what you can do with REST and what's in the API aren't always identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, I just went back to my function that removed duplicates, so at least I can move forward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 16:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80064#M7341</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-27T16:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80065#M7342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tracy perhaps the 'problem' service doesn't support querying using things like Distinct. You can test this by checking the layer's &lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#advancedquerycapabilities"&gt;advancedQueryCapabilities&lt;/A&gt; property. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 16:39:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80065#M7342</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2015-08-27T16:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: returnDistinctValues not working in my query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80066#M7343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd just been going by what I could see from the REST service, which said &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14.3999996185303px;"&gt;Supports Advanced Queries: &lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14.3999996185303px;"&gt;true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14.3999996185303px;"&gt;I tried var test = app.buildingLayer.advancedQueryCapabilities; and looked at that object.&amp;nbsp; It is &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14.3999996185303px;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/124188_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 16:50:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/returndistinctvalues-not-working-in-my-query/m-p/80066#M7343</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-27T16:50:16Z</dc:date>
    </item>
  </channel>
</rss>

