<?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 How to get the query return distinct values progammatically? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1480348#M12740</link>
    <description>&lt;P&gt;Hello - I have searched around and seen this post dated about 1.5 year ago:&amp;nbsp;&lt;A href="https://community.esri.com/t5/net-maps-sdk-questions/featuretable-distinct-query/m-p/1253615#M11636" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/net-maps-sdk-questions/featuretable-distinct-query/m-p/1253615#M11636&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If queryResult is my&amp;nbsp;QueryParameters object, I couldn't find queryResult.R&lt;SPAN&gt;eturnDistinctValues&amp;nbsp;(or something like that)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;Up to now, has .Net Maps SDK equivalent of javascript's &lt;STRONG&gt;returnDistinctValues&lt;/STRONG&gt; been exposed some where else so I can use it?&lt;/FONT&gt;&lt;/P&gt;&lt;H4&gt;Further more, when True radio-button is on for this option in a Feature Service Layer's Query page, I've got some error seen down here:&lt;BR /&gt;  &lt;/H4&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cannot-complete_err.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105675iC9F0CB3B1D7FA351/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cannot-complete_err.png" alt="cannot-complete_err.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Return_Distinct_Value_True.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105677i28A0EC2596D3BCED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Return_Distinct_Value_True.png" alt="Return_Distinct_Value_True.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;FONT color="#3366FF"&gt;The Return Distinct Values option has never worked, hasn't it? What am I missing, did the my local administrator forget to turn on something to get it to work ?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2024 16:28:28 GMT</pubDate>
    <dc:creator>KTT_Mercury</dc:creator>
    <dc:date>2024-05-29T16:28:28Z</dc:date>
    <item>
      <title>How to get the query return distinct values progammatically?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1480348#M12740</link>
      <description>&lt;P&gt;Hello - I have searched around and seen this post dated about 1.5 year ago:&amp;nbsp;&lt;A href="https://community.esri.com/t5/net-maps-sdk-questions/featuretable-distinct-query/m-p/1253615#M11636" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/net-maps-sdk-questions/featuretable-distinct-query/m-p/1253615#M11636&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If queryResult is my&amp;nbsp;QueryParameters object, I couldn't find queryResult.R&lt;SPAN&gt;eturnDistinctValues&amp;nbsp;(or something like that)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;Up to now, has .Net Maps SDK equivalent of javascript's &lt;STRONG&gt;returnDistinctValues&lt;/STRONG&gt; been exposed some where else so I can use it?&lt;/FONT&gt;&lt;/P&gt;&lt;H4&gt;Further more, when True radio-button is on for this option in a Feature Service Layer's Query page, I've got some error seen down here:&lt;BR /&gt;  &lt;/H4&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cannot-complete_err.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105675iC9F0CB3B1D7FA351/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cannot-complete_err.png" alt="cannot-complete_err.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Return_Distinct_Value_True.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105677i28A0EC2596D3BCED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Return_Distinct_Value_True.png" alt="Return_Distinct_Value_True.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;FONT color="#3366FF"&gt;The Return Distinct Values option has never worked, hasn't it? What am I missing, did the my local administrator forget to turn on something to get it to work ?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 16:28:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1480348#M12740</guid>
      <dc:creator>KTT_Mercury</dc:creator>
      <dc:date>2024-05-29T16:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the query return distinct values progammatically?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1484547#M12749</link>
      <description>&lt;P&gt;Return Distinct Values at the REST API works, it took me a little trial and error to get it returning results... I found (at the time) that it was poorly documented.&amp;nbsp; Consider &lt;A href="https://portlandmaps.com/arcgis/rest/services/Public/Transportation/MapServer/4/query?where=1%3D1&amp;amp;text=&amp;amp;objectIds=&amp;amp;time=&amp;amp;timeRelation=esriTimeRelationOverlaps&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;distance=&amp;amp;units=esriSRUnit_Foot&amp;amp;relationParam=&amp;amp;outFields=PARKINGDURATION&amp;amp;returnGeometry=false&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;havingClause=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=true&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;returnExtentOnly=false&amp;amp;sqlFormat=none&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=html" target="_self"&gt;this query&lt;/A&gt; against a parking meter layer which proves the layer has a record count of about 40,000 features.&amp;nbsp; Here is &lt;A href="https://portlandmaps.com/arcgis/rest/services/Public/Transportation/MapServer/4/query?where=1%3D1&amp;amp;text=&amp;amp;objectIds=&amp;amp;time=&amp;amp;timeRelation=esriTimeRelationOverlaps&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;distance=&amp;amp;units=esriSRUnit_Foot&amp;amp;relationParam=&amp;amp;outFields=PARKINGDURATION&amp;amp;returnGeometry=false&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;havingClause=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=PARKINGDURATION&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=true&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;returnExtentOnly=false&amp;amp;sqlFormat=none&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=html" target="_self"&gt;another query&lt;/A&gt; that returns the 16 unique values found in the &lt;EM&gt;parkingduration&lt;/EM&gt; field, across those same 40,000+ features.&amp;nbsp; &amp;nbsp;The critical parameters are (a) use an inclusive where clause that encompasses every row, hence 1=1.&amp;nbsp; (b) Set the out fields and order by fields to only be the field you want distinct values of (c) set return distinct values to true and (d) set return geometry to false.&amp;nbsp; The links above should take you the populated query forms which demonstrate the concept.&lt;/P&gt;&lt;P&gt;Concerning your first question, I found that I needed to implement a class to hit the REST api directly as the Maps SDK didn't give me a suitable abstraction for distinct values.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 16:53:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1484547#M12749</guid>
      <dc:creator>Mike_Quetel</dc:creator>
      <dc:date>2024-06-04T16:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the query return distinct values progammatically?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1484555#M12750</link>
      <description>&lt;P&gt;Also, if you do implement your own REST api class, consider the possibility that the number of distinct values returned could exceed the max features allowable per query... so you may have to implement paging logic, which is supported by the RESTI api.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 16:54:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-get-the-query-return-distinct-values/m-p/1484555#M12750</guid>
      <dc:creator>Mike_Quetel</dc:creator>
      <dc:date>2024-06-04T16:54:52Z</dc:date>
    </item>
  </channel>
</rss>

