<?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: incorrect number of arguments? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654758#M14631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try removing "event:Event" so it looks like:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private function search():void
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed it and now its getting no errors and the box came out right. But after I input the lat/long and click search, it give me another error saying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[RPC Fault faultString="Unable to complete&amp;nbsp; operation." faultCode="400" faultDetail="Unable to complete Query operation."]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there anything important I am missing here?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:44:29 GMT</pubDate>
    <dc:creator>GeorgiannaStrode</dc:creator>
    <dc:date>2021-12-12T03:44:29Z</dc:date>
    <item>
      <title>incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654754#M14627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my mxml file I keep getting error 1136: "Incorrect number of arguments.Expected 1." from the codes below. I have declared search() function in the ActionScript part already so there should be no problem. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp; &amp;lt;s:Button x="130" y="270" click="search()" label="{search}"/&amp;gt; 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 21:05:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654754#M14627</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2011-01-24T21:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654755#M14628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sounds like the search function is expecting an argument to be passed to it. How is it declared in the code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 22:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654755#M14628</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-01-24T22:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654756#M14629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It sounds like the search function is expecting an argument to be passed to it. How is it declared in the code?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private function search(event:Event):void
&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var query:Query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = queryAttribute1 + "='" + txtSearch1.text + "'"+queryAttribute2 + "='" + txtSearch1.text + "'";
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.url = featureURL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, new AsyncResponder(onResult, onFault));
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; function onResult(featureSet:FeatureSet, token:Object = null):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (featureSet.features.length == 0){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("Not found.");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else if(featureSet.features.length == 1){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(featureSet.features[0].geometry is MapPoint)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.scale = 24000;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAt(featureSet.features[0].geometry as MapPoint);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent = GraphicUtil.getGraphicsExtent(featureSet.features);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent = GraphicUtil.getGraphicsExtent(featureSet.features);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; function onFault(info:Object, token:Object = null):void
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show(info.toString());
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:44:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654756#M14629</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2021-12-12T03:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654757#M14630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try removing "event:Event" so it looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private function search():void
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654757#M14630</guid>
      <dc:creator>JasonLevine</dc:creator>
      <dc:date>2021-12-12T03:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654758#M14631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try removing "event:Event" so it looks like:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private function search():void
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed it and now its getting no errors and the box came out right. But after I input the lat/long and click search, it give me another error saying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[RPC Fault faultString="Unable to complete&amp;nbsp; operation." faultCode="400" faultDetail="Unable to complete Query operation."]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there anything important I am missing here?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654758#M14631</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2021-12-12T03:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654759#M14632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think there might be something wrong with your query.where statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;query.where = queryAttribute1 + "='" + txtSearch1.text + "'"+queryAttribute2 + "='" + txtSearch1.text + "'";&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example of how it should be formatted is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;query.where = "STATE_NAME = 'Alaska' AND TYPE = 'city'";&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So in your case, it could go something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;query.where = queryAttribute1+"='"+txtSearch1.text+"' AND "+queryAttribute2+"='"+txtSearch1.text+"'";&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jan 2011 23:28:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654759#M14632</guid>
      <dc:creator>JasonLevine</dc:creator>
      <dc:date>2011-01-25T23:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: incorrect number of arguments?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654760#M14633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jason, your codes work better. Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Whatever i type in it still says "Not found". Im trying to make a lat/long zoom. and now i'm using this query statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
query.where = queryAttribute1+"='"+txtSearch1.text+"','"+txtSearch2.text+"'
&amp;nbsp;&amp;nbsp;&amp;nbsp; AND "+queryAttribute2+"='"+txtSearch3.text+"','"+txtSearch4.text+"'";
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for queryAttribute1 Im using latitude attribute of a lyer, for Attribute2 I'm using longitude attribute. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;textSearch1 and 2 are for latitude input, textSearch3 and 4 are for longitude input(found it from bookmark.xml).&amp;nbsp; They tell me my codes have problem again. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder if anyone knows how to handle this lat/long thing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/incorrect-number-of-arguments/m-p/654760#M14633</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2021-12-12T03:44:31Z</dc:date>
    </item>
  </channel>
</rss>

