<?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: Repeater CurrentItem Value and Where Clause in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714519#M15881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Drew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for your reply. From your code, I understand you are storing the value in a string and then assigning it in the where clause. But I am having hard time applying this to the SFV.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my application, I am already querying a set of data and displaying it in the widget. So I want to get the value (ID) of the data that I click on and store this in the label1.text (Please see attachment). Still not sure how to do this. Hope you can put me in the right direction. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Oct 2010 15:40:17 GMT</pubDate>
    <dc:creator>KomanDiabate</dc:creator>
    <dc:date>2010-10-14T15:40:17Z</dc:date>
    <item>
      <title>Repeater CurrentItem Value and Where Clause</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714517#M15879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to figure it out how setup the where clause on my query by pulling the value from the wRepeater on the Flex Sample Viewer. However, I am unable to correclty read the value to the query where clause. I also tried to store the value to a simple mx:label and I am still having problems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone please help me figure this out, or tell me if this is even possible. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;esri:QueryTask id="existingQueryTask" showBusyCursor="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://ArcGIS/rest/services/Test/BaseLayers/MapServer/3" /&amp;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;lt;esri:Query id="exParkQuery" where="ParkId='{wRepeater.currentItem.ParkId}'" returnGeometry="true"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:outFields&amp;gt;*&amp;lt;/esri:outFields&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Query&amp;gt;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 22:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714517#M15879</guid>
      <dc:creator>KomanDiabate</dc:creator>
      <dc:date>2010-10-13T22:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Repeater CurrentItem Value and Where Clause</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714518#M15880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a sample that shows how to get the item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at the code "doQuery(event...)" and see how to get the repeater index then get that item from your array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;

&amp;lt;s:Application name="Repeater Test"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:fx="http://ns.adobe.com/mxml/2009"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags"&amp;gt;
 
 &amp;lt;fx:Script&amp;gt;
&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp; import com.esri.ags.events.QueryEvent;
&amp;nbsp;&amp;nbsp; import mx.controls.Alert;
&amp;nbsp;&amp;nbsp; import mx.states.State;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function doQuery(event:Event):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var state:String = arrList.getItemAt(event.currentTarget.repeaterIndex).toString();
&amp;nbsp;&amp;nbsp;&amp;nbsp; var where:String = "STATE_NAME = '"+state+"'";
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = where;
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = ["STATE_NAME"];
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.addEventListener(QueryEvent.EXECUTE_COMPLETE, onQueryComplete);
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query);&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function onQueryComplete(result:QueryEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Alert.show("done"); 
&amp;nbsp;&amp;nbsp; }

&amp;nbsp; ]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;
 
 
 &amp;lt;fx:Declarations&amp;gt;
&amp;nbsp; &amp;lt;s:ArrayList id="arrList" source="[New York,California,Florida]"/&amp;gt;
&amp;nbsp; &amp;lt;esri:QueryTask useAMF="false" id="queryTask" showBusyCursor="true" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"/&amp;gt;
&amp;nbsp; &amp;lt;esri:Query id="query" outSpatialReference="{myMap.spatialReference}" returnGeometry="true"/&amp;gt;
 &amp;lt;/fx:Declarations&amp;gt;
 
 
 &amp;lt;esri:Map id="myMap"&amp;gt;
&amp;nbsp; &amp;lt;esri:extent&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:Extent xmin="-14298000" ymin="2748000" xmax="-6815000" ymax="7117000"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SpatialReference wkid="102100"/&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Extent&amp;gt;
&amp;nbsp; &amp;lt;/esri:extent&amp;gt;
&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer"/&amp;gt;
&amp;nbsp; &amp;lt;esri:GraphicsLayer id="myGraphicsLayer" graphicProvider="{queryTask.executeLastResult.features}"/&amp;gt;
 &amp;lt;/esri:Map&amp;gt;

 
 &amp;lt;s:VGroup horizontalCenter="0" verticalCenter="0"&amp;gt;
&amp;nbsp; &amp;lt;mx:HBox&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;mx:Repeater id="rpt" dataProvider="{arrList}"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Button click="doQuery(event)" left="20" top="335" label="{rpt.currentItem}" /&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/mx:Repeater&amp;gt;
&amp;nbsp; &amp;lt;/mx:HBox&amp;gt;
 &amp;lt;/s:VGroup&amp;gt;
 
 
&amp;lt;/s:Application&amp;gt;

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Drew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:35:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714518#M15880</guid>
      <dc:creator>Drew</dc:creator>
      <dc:date>2021-12-12T06:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Repeater CurrentItem Value and Where Clause</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714519#M15881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Drew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for your reply. From your code, I understand you are storing the value in a string and then assigning it in the where clause. But I am having hard time applying this to the SFV.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my application, I am already querying a set of data and displaying it in the widget. So I want to get the value (ID) of the data that I click on and store this in the label1.text (Please see attachment). Still not sure how to do this. Hope you can put me in the right direction. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 15:40:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714519#M15881</guid>
      <dc:creator>KomanDiabate</dc:creator>
      <dc:date>2010-10-14T15:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Repeater CurrentItem Value and Where Clause</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714520#M15882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post your repeater code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 15:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714520#M15882</guid>
      <dc:creator>Drew</dc:creator>
      <dc:date>2010-10-14T15:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Repeater CurrentItem Value and Where Clause</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714521#M15883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure, Here are the major parts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1 -So the first query is just a regular SFV SearchWidget Query. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2- Second function tries to assign repeater id to label (unsuccessfully):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private function rep(event:MouseEvent):void&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; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.text='{wRepeater.currentItem.ParkId}';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3- The third part is the query itself in actionscript where the where clause in located.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed if I formulate the where clause like this everything will&amp;nbsp; work: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where="ParkId=2" but I wont to get the id on the clicked repeater.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;esri:QueryTask id="existingQueryTask"&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; showBusyCursor="true"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://*****/ArcGIS/rest/services/Test/BaseLayers/MapServer/3" rel="nofollow" target="_blank"&gt;http://*****/ArcGIS/rest/services/Test/BaseLayers/MapServer/3&lt;/A&gt;&lt;SPAN&gt;" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&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;lt;esri:Query id="exParkQuery" where="ParkId='{wRepeater.currentItem.ParkId}'" returnGeometry="true"&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;lt;esri:outFields&amp;gt;*&amp;lt;/esri:outFields&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;lt;/esri:Query&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4 - Here is the repeater that call the first function on mouseup event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;mx:Label id="t"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;mx:Repeater id="wRepeater"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;widgets:RecordData infoData="{wRepeater.currentItem}"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mouseOver="mouseOverRecord(event)" mouseOut="mouseOutRecord()" click="clickRecord(event)" mouseUp="rep(event)"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/mx:Repeater&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 16:28:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/repeater-currentitem-value-and-where-clause/m-p/714521#M15883</guid>
      <dc:creator>KomanDiabate</dc:creator>
      <dc:date>2010-10-14T16:28:47Z</dc:date>
    </item>
  </channel>
</rss>

