<?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: 'where' parameter is invalid on query on feature layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390302#M36005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried running the query using Rest API interface using &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://services1.arcgis.com/Mpa25zPNMAT08GQg/ArcGIS/rest/services/AllPropertiesEstablished/FeatureServer/0/query"&gt;http://services1.arcgis.com/Mpa25zPNMAT08GQg/ArcGIS/rest/services/AllPropertiesEstablished/FeatureServer/0/query&lt;/A&gt;&lt;SPAN&gt; in browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Even there where parameter is giving same error you are getting in your code when using with outStatistics&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't know why it is not accepting the where clause, as Rest API documentation &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/"&gt;http://resources.arcgis.com/en/help/rest/apiref/&lt;/A&gt;&lt;SPAN&gt; says that&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When using outStatistics the only other parameters that will be used are groupByFieldsForStatistics, orderByFields, text, time, and where.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Sep 2013 11:42:39 GMT</pubDate>
    <dc:creator>VinayBansal</dc:creator>
    <dc:date>2013-09-11T11:42:39Z</dc:date>
    <item>
      <title>'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390301#M36004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it has been a week that I have this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't changed anything on my code but 1 week ago I received a "'where' parameter is invalid" error when this query is executed on a feature service (hosted on Arcgis online):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var statDef = new StatisticDefinition();
&amp;nbsp; statDef.statisticType = "sum";
&amp;nbsp; statDef.onStatisticField = "Area";
&amp;nbsp; statDef.outStatisticFieldName = "Tot Area";
&amp;nbsp; 
&amp;nbsp; var query = new Query();
&amp;nbsp; query.returnGeometry = false;
&amp;nbsp; query.where = "Area&amp;gt;0";
&amp;nbsp; query.outFields = ["Area"];
&amp;nbsp; query.outStatistics = [ statDef ];
&amp;nbsp; query.groupByFieldsForStatistics = ["YearEstabl", "TypeName"];
&amp;nbsp; query.orderByFields = ["YearEstabl", "TypeName"];
&amp;nbsp; 
&amp;nbsp; var qt = new QueryTask("http://services1.arcgis.com/Mpa25zPNMAT08GQg/ArcGIS/rest/services/AllPropertiesEstablished/FeatureServer/0");
&amp;nbsp; qt.execute(query, function(result){
&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; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am referencing to //js.arcgis.com/3.6/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 00:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390301#M36004</guid>
      <dc:creator>PeterHudson</dc:creator>
      <dc:date>2013-09-11T00:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390302#M36005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried running the query using Rest API interface using &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://services1.arcgis.com/Mpa25zPNMAT08GQg/ArcGIS/rest/services/AllPropertiesEstablished/FeatureServer/0/query"&gt;http://services1.arcgis.com/Mpa25zPNMAT08GQg/ArcGIS/rest/services/AllPropertiesEstablished/FeatureServer/0/query&lt;/A&gt;&lt;SPAN&gt; in browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Even there where parameter is giving same error you are getting in your code when using with outStatistics&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't know why it is not accepting the where clause, as Rest API documentation &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/"&gt;http://resources.arcgis.com/en/help/rest/apiref/&lt;/A&gt;&lt;SPAN&gt; says that&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When using outStatistics the only other parameters that will be used are groupByFieldsForStatistics, orderByFields, text, time, and where.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 11:42:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390302#M36005</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-09-11T11:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390303#M36006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To use outStatistics, the layer has to support Statistics. The layer you are querying does not support it. Here is one feature layer that supports it. Look for &lt;/SPAN&gt;&lt;STRONG&gt;Supports Statistics:&lt;/STRONG&gt;&lt;SPAN&gt; entry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 12:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390303#M36006</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2013-09-11T12:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390304#M36007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jason,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the statistics is working on this layer......if we run query without passing the where clause......&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the attachment.......&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 14:57:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390304#M36007</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-09-11T14:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390305#M36008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems like spaces are not welcomed for outStatisticFieldName.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try to change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;statDef.outStatisticFieldName = "Tot Area";&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;statDef.outStatisticFieldName = "TotArea";&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 15:07:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390305#M36008</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2013-09-11T15:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390306#M36009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Interesting. &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/query_statistics.html"&gt;This sample&lt;/A&gt;&lt;SPAN&gt; does use where clause for the statistical calculation, and it works. The main difference I can tell is the sample uses a feature layer that supports statistics, while rokitmaps uses a feature service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 15:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390306#M36009</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2013-09-11T15:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390307#M36010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Interesting. &lt;A href="https://developers.arcgis.com/en/javascript/jssamples/query_statistics.html"&gt;This sample&lt;/A&gt; does use where clause for the statistical calculation, and it works. The main difference I can tell is the sample uses a feature layer that supports statistics, while rokitmaps uses a feature service.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; Yes Jason, not seeing any other difference, other than Supports statistics......&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So rokitmaps, atleast you can give it a try by setting SupportsStatistics true for the layer.....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 16:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390307#M36010</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-09-11T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390308#M36011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes Jason, not seeing any other difference, other than Supports statistics......&lt;BR /&gt;So rokitmaps, atleast you can give it a try by setting SupportsStatistics true for the layer.....&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;From &lt;/SPAN&gt;&lt;A href="http://services1.arcgis.com/Mpa25zPNMAT08GQg/arcgis/rest/services/AllPropertiesEstablished/FeatureServer/0?f=pjson"&gt;here&lt;/A&gt;&lt;SPAN&gt; I can see that "supportsStatistics" : true. In fact it worked before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The query works without the StatisticDefinition. Anyway, I had to rewrite my code and do the group by manually... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 05:42:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390308#M36011</guid>
      <dc:creator>PeterHudson</dc:creator>
      <dc:date>2013-09-12T05:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: 'where' parameter is invalid on query on feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390309#M36012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can try by accessing the mapservice as MapServer instead of FeatureServer.....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 08:10:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/where-parameter-is-invalid-on-query-on-feature/m-p/390309#M36012</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-09-12T08:10:47Z</dc:date>
    </item>
  </channel>
</rss>

