<?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: Attribute Query Task Question in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121654#M3047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jennifer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very cool!&amp;nbsp; It is now coming clear and with your help I have the sample working.&amp;nbsp; I'm still slightly confused on adding another parameter to my query.&amp;nbsp; I can't seem to get the syntax down would I do something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Where = string.Format("STATE_ABBR = '{0}'", QueryComboBox.SelectedItem) and MED_AGE &amp;lt; 46;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or would it go up in the initialize like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Where = "MED_AGE &amp;lt; 33" and "MED_AGE_M &amp;gt; 32";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both syntax are giving me errors.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You tired to point me in the right direction with this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/16119-Attribute-Query-on-Muitiple-fields"&gt;http://forums.arcgis.com/threads/16119-Attribute-Query-on-Muitiple-fields&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Nov 2010 23:29:24 GMT</pubDate>
    <dc:creator>ChristineZeller</dc:creator>
    <dc:date>2010-11-01T23:29:24Z</dc:date>
    <item>
      <title>Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121648#M3041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to implement the Attribute Query example from the SDK and I can get it working on my machine "as is" but when I change over to a layer that I'm servering it doesn't work. Also if I change the example to just use a different field like STATE_ABBR instead of STATE_NAME I have the same problem....it breaks!&amp;nbsp; Am I missing a change?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Christine&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 17:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121648#M3041</guid>
      <dc:creator>ChristineZeller</dc:creator>
      <dc:date>2010-11-01T17:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121649#M3042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you say "it breaks", what error message do you see? Have you tried to use Fiddler to see where it possibly fails?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 18:01:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121649#M3042</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-11-01T18:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121650#M3043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jennifer, thanks for the reply!&amp;nbsp; Yea it fires when I use the State_Name but like I said if I just switch it to a different field like STATE_ABBR (just two easy changes in the code behind).&amp;nbsp; It never returns the query and/or zooms to the feature.&amp;nbsp; Here's the last fiddler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've attached a screen shot of my last fiddler result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like there is some little stupid change I'm missing.&amp;nbsp; Do I need to change the WHERE?&amp;nbsp; I not really sure what the where is stating&amp;nbsp; "query.Where = "1=1";"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Christine&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 19:31:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121650#M3043</guid>
      <dc:creator>ChristineZeller</dc:creator>
      <dc:date>2010-11-01T19:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121651#M3044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh I see what the problem is now. In this sample &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery&lt;/A&gt;&lt;SPAN&gt; (if you are using this), the query OutFields only include "STATE_NAME".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The service that it's using is &lt;/SPAN&gt;&lt;A href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5&lt;/A&gt;&lt;SPAN&gt; and "STATE_ABBR", while it is a valid field, is not included in the OutFields. You can update this line&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
query.OutFields.AddRange(new string[] { "STATE_NAME"&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;, "STATE_ABBR"&lt;/SPAN&gt; });
//or simply use * to return all fields -- query.OutFields.Add("*");
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:02:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121651#M3044</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T07:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121652#M3045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Oh I see what the problem is now. In this sample&amp;nbsp;&amp;nbsp; &lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AttributeQuery&lt;/A&gt; (if you are using this), the query OutFields only include "STATE_NAME".&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;The service that it's using is&amp;nbsp;&amp;nbsp; &lt;A href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5&lt;/A&gt; and "STATE_ABBR", while it is a valid field, is not included in the OutFields. You can update this line&amp;nbsp; &lt;BR /&gt; &lt;PRE class="lia-code-sample line-numbers language-none"&gt;
query.OutFields.AddRange(new string[] { "STATE_NAME"&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;, "STATE_ABBR"&lt;/SPAN&gt; });
//or simply use * to return all fields -- query.OutFields.Add("*");
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jennifer, thanks again for the replies. I am using the sample you pointed to. I was just changing the code like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; // Specify fields to return from initial query&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; //query.OutFields.AddRange(new string[] { "STATE_ABBR" });&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try this instead:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query.OutFields.AddRange(new string[] { "STATE_NAME", "STATE_ABBR" }); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same results...no return...just sits there&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.OutFields.Add("*");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only other thing I'm changing is &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 if ((args.UserState as string) == "initial")
&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; // Just show on initial load
&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; QueryComboBox.Items.Add("Select...");

&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; foreach (Graphic graphic in args.FeatureSet.Features)
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QueryComboBox.Items.Add(graphic.Attributes["STATE_ABBR"].ToString());


&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QueryComboBox.SelectedIndex = 0;
&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; return;
&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>Sat, 11 Dec 2021 07:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121652#M3045</guid>
      <dc:creator>ChristineZeller</dc:creator>
      <dc:date>2021-12-11T07:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121653#M3046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looking at how the Query is formed, it uses Text property which checks against the layer's DisplayField &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Text.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Text.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the given layer, DisplayField is STATE_NAME, therefore the query with STATE_ABBR does not return any results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will update Where property instead of Text property in the SelectionChanged event handler.&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Where.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Where.html&lt;/A&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 query.Where = string.Format("STATE_ABBR = '{0}'", QueryComboBox.SelectedItem);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:02:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121653#M3046</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T07:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121654#M3047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jennifer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very cool!&amp;nbsp; It is now coming clear and with your help I have the sample working.&amp;nbsp; I'm still slightly confused on adding another parameter to my query.&amp;nbsp; I can't seem to get the syntax down would I do something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Where = string.Format("STATE_ABBR = '{0}'", QueryComboBox.SelectedItem) and MED_AGE &amp;lt; 46;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or would it go up in the initialize like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Where = "MED_AGE &amp;lt; 33" and "MED_AGE_M &amp;gt; 32";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both syntax are giving me errors.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You tired to point me in the right direction with this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/16119-Attribute-Query-on-Muitiple-fields"&gt;http://forums.arcgis.com/threads/16119-Attribute-Query-on-Muitiple-fields&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 23:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121654#M3047</guid>
      <dc:creator>ChristineZeller</dc:creator>
      <dc:date>2010-11-01T23:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121655#M3048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you used string.Format()? Here's some documentation on how it is used. &lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.string.format(v=VS.100).aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/system.string.format(v=VS.100).aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can update the Where to the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
int min = 32, max = 33;
query.Where = string.Format("STATE_ABBR = '{0}' and MED_AGE &amp;lt; {1}and MED_AGE_M &amp;gt; {2}", QueryComboBox.SelectedItem, min, max);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The best way to test if you are constructing a good SQL Where clause is to try it out on the browser first, by clicking on "Query Layer" link underneath the layer URL.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:02:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121655#M3048</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T07:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121656#M3049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jennifer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a bunch for your help!&amp;nbsp; I really apprecaite it.....you rock!&amp;nbsp; I was hoping to ask another question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the for loop that is populating the combo box is running on a field that doesn't have unique vales for each record.....in the sdk example it is populating state names and each state has a unique name but I'm populating it with call types and the call types repeat.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my questing is how can I eliminate duplications&amp;nbsp; (ex. Call Type = Traffic Stop is listed 15 times in the list and I only want to list it once.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&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; foreach (Graphic graphic in args.FeatureSet.Features)&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; {&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; TypeDescComboBox.Items.Add(graphic.Attributes["TYPEDESC"].ToString());&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; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Christine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 19:28:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121656#M3049</guid>
      <dc:creator>ChristineZeller</dc:creator>
      <dc:date>2010-11-03T19:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121657#M3050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use Distinct() from System.Linq and set your ComboBox ItemsSource property, provided that it does not already contain items.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
TypeDescComboBox.ItemsSource = (from g in args.FeatureSet.Features
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select g.Attributes["TYPEDESC"]).Distinct();
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is just one way, you can also use a dictionary or list to temporarily hold the attribute values and check whether the attribute value already exist before adding to your ComboBox.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:02:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121657#M3050</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T07:02:24Z</dc:date>
    </item>
    <item>
      <title>Running Query for a field for repeated numbers</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121658#M3051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to ArcGIS and would like to know if there is any way where in I can query the attribute table (particularly a field) which has number for example (1,1,2,2,2,4,4,4,4,4,4,5,6,6,6) and I want to know all the fields which has more than one repetation of numbers. In above example I really don't care about number 5 because its occuring only once. Reponse in this regard would be highly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Nov 2010 22:45:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121658#M3051</guid>
      <dc:creator>ChaitanyaPathak</dc:creator>
      <dc:date>2010-11-06T22:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Query Task Question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121659#M3052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Where property of a Query is any legal SQL Where clause as been said here: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Where.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Query~Where.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I don't think you can get repeating values by updating the query alone.&amp;nbsp; You can probably use System.Linq query on the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please don't hold me accountable for the syntax &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but I think it's something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var repeatingValues = from g in args.FeatureSet.Features
group g by g.Attributes["FieldName"] into f
where f.Count() &amp;gt; 1
select f.Key;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:02:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/attribute-query-task-question/m-p/121659#M3052</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T07:02:27Z</dc:date>
    </item>
  </channel>
</rss>

