<?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: Querying Distinct Values in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580249#M14864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kindly look at post #10 in &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/16305-Attribute-Query-Task-Question"&gt;http://forums.arcgis.com/threads/16305-Attribute-Query-Task-Question&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Nov 2010 21:22:50 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2010-11-30T21:22:50Z</dc:date>
    <item>
      <title>Querying Distinct Values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580246#M14861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know that I have to so some kind of LINQ query on the returned featureset similar to this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sortedGraphics As IOrderedEnumerable(Of Graphic) = args.FeatureSet.Features.OrderBy(Function(g) g.Attributes("CONTRACT"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim sortedGraphics As IOrderedEnumerable(Of Graphic) = args.FeatureSet.Features.Distinct(Function(g) g.Attributes("CONTRACT"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lambda expression cannot be converted to 'System.Collections.Generic.IEqualityComparer(Of ESRI.ArcGIS.Client.Graphic)' because 'System.Collections.Generic.IEqualityComparer(Of ESRI.ArcGIS.Client.Graphic)' is not a delegate type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be great. I'm just trying to populate a combobox with unique values&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Bert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 14:40:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580246#M14861</guid>
      <dc:creator>RobertMEIER</dc:creator>
      <dc:date>2010-07-14T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Distinct Values - Solution</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580247#M14862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I guess I just had to dig deeper into LINQ queries. Here is the&amp;nbsp; code I used, I found it by googling around&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim unqVals = From featx In args.FeatureSet Distinct _&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where featx.Attributes("CONTRACT") &amp;lt;&amp;gt; "" _&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select featx.Attributes("CONTRACT") Distinct&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each sVal As String In unqVals&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim cbItem As New ComboBoxItem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cbItem.Content = sVal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cbxContract.Items.Add(cbItem)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-bert&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 15:00:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580247#M14862</guid>
      <dc:creator>RobertMEIER</dc:creator>
      <dc:date>2010-07-14T15:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Distinct Values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580248#M14863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have a similar example for C#??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 21:12:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580248#M14863</guid>
      <dc:creator>JackCibor</dc:creator>
      <dc:date>2010-11-30T21:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Distinct Values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580249#M14864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kindly look at post #10 in &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/16305-Attribute-Query-Task-Question"&gt;http://forums.arcgis.com/threads/16305-Attribute-Query-Task-Question&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 21:22:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580249#M14864</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-11-30T21:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Distinct Values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580250#M14865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In these examples the distinct values are&amp;nbsp; derived from the results of a query task returning the entire dataset to the client. The database I need to return the values for has 40,000 records in it. Does anyone have experience/ideas on doing this on the server side so just the unique values are returned to the client.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 13:47:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580250#M14865</guid>
      <dc:creator>JackCibor</dc:creator>
      <dc:date>2010-12-02T13:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Distinct Values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580251#M14866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think your question is best directed to the ArcGIS Server team. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may find this blog post useful too: &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2010/08/30/Populate-a-combo-box-with-unique-values-using-a-query-layer.aspx"&gt;http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2010/08/30/Populate-a-combo-box-with-unique-values-using-a-query-layer.aspx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 18:12:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580251#M14866</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-12-02T18:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Querying Distinct Values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580252#M14867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In these examples the distinct values are&amp;nbsp; derived from the results of a query task returning the entire dataset to the client. The database I need to return the values for has 40,000 records in it. Does anyone have experience/ideas on doing this on the server side so just the unique values are returned to the client.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The following blog post also may be of interest to you - it specifically mentions ArcIMS but still is somewhat applicable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://blog.geocortex.com/2008/09/11/bending-the-rules/"&gt;http://blog.geocortex.com/2008/09/11/bending-the-rules/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The truly efficient method of doing this with ArcIMS that the blog post talks about is not likely to be available through the REST api and therefore the Silverlight client (I think the "feature" was even disabled in later ArcIMS versions) but the first method mentioned there still can be speedier than retrieving all records in one fell swoop, particularly when that number of records is quite large.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 20:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querying-distinct-values/m-p/580252#M14867</guid>
      <dc:creator>JohnFletcher</dc:creator>
      <dc:date>2010-12-02T20:37:40Z</dc:date>
    </item>
  </channel>
</rss>

