<?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: JavascriptAPI OR in query in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147597#M13763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like they are doing more behind the scenes to limit queries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jul 2019 18:20:06 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2019-07-01T18:20:06Z</dc:date>
    <item>
      <title>JavascriptAPI OR in query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147594#M13760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to be able to query a mapservice that contains a number of different OBJECTIDs.&amp;nbsp; In regular SQL I would say "(OBJECTID = 123) OR (OBJECTID =456).&amp;nbsp; When I put this in my where clause of the Javascript API, I get an error that the where clause is an invalid parameter:&lt;/P&gt;&lt;PRE style="font-family: Consolas; font-size: 13; color: black; background: #e1e1e1;"&gt;&lt;SPAN style="color: blue;"&gt;var&lt;/SPAN&gt;&amp;nbsp;query3&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;new&lt;/SPAN&gt;&amp;nbsp;Query(); query3.returnGeometry&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;true&lt;/SPAN&gt;; query3.where&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: red;"&gt;"(OBJECTID=123) OR (OBJECTID=456)&lt;/SPAN&gt;query3.outSpatialReference&amp;nbsp;=&amp;nbsp;{&amp;nbsp;&lt;SPAN style="color: red;"&gt;"wkid"&lt;/SPAN&gt;:&amp;nbsp;102100&amp;nbsp;};&lt;/PRE&gt;&lt;P&gt;I need the geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried where="OBJECTID in (123,456)" and I get the same error message. This is the result of a vendor limiting a query to 100 features unless a "resultOffset" that returns only IDs is used, so I need to first pull the 100 IDs and then I have to loop through to create another query that will pull the features that have those 100 IDs. It seems so simple, but I can't seem to do it! Please help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2019 23:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147594#M13760</guid>
      <dc:creator>LisaT</dc:creator>
      <dc:date>2019-06-28T23:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: JavascriptAPI OR in query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147595#M13761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I T,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The "&lt;SPAN style="background-color: #ffffff;"&gt;OBJECTID&amp;nbsp;IN (123, 456)" should be a valid where statement. Are you sure that OBJECTID is your layers actual Object Id field?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 15:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147595#M13761</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-01T15:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: JavascriptAPI OR in query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147596#M13762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is really confusing me.&amp;nbsp; If I change the query to:&amp;nbsp; query3.where&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: red;"&gt;"OBJECTID&amp;nbsp;in&amp;nbsp;(123)"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;it still fails. But, if I change it to:&amp;nbsp;&amp;nbsp;&amp;nbsp; query3.where&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: red;"&gt;"OBJECTID = 123"&lt;/SPAN&gt;;&amp;nbsp;&amp;nbsp; it works!&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;&amp;nbsp; query3.returnGeometry&amp;nbsp;=&amp;nbsp;&lt;SPAN style="color: blue;"&gt;true&lt;/SPAN&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;query3.outFields&amp;nbsp;=&amp;nbsp;[&lt;SPAN style="color: red;"&gt;"OBJECTID"&lt;/SPAN&gt;]&amp;nbsp; .Does this somehow affect the where clause? Are there limitations on queries you can pull on the OBJECTID?&amp;nbsp;&amp;nbsp; Is there a specific order that I need to declare the parameters? This is the URL that is built:&lt;/P&gt;&lt;P&gt;&lt;A href="https://vendorwebsite.com/api/rest_services/client=ABC123/Parcels/MapServer/0/query?f=json&amp;amp;where=OBJECTID%20in%20(123)&amp;amp;returnGeometry=true&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outFields=OBJECTID&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript8._jsonpCallback"&gt;https://vendorwebsite.com/api/rest_services/client=ABC123/Parcels/MapServer/0/query?f=json&amp;amp;where=OBJECTID%20in%20(123)&amp;amp;returnGeometry=true&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outFields=OBJECTID&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript8._jsonpCallback&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the actual message returned:&lt;/P&gt;&lt;PRE style="font-family: Consolas; font-size: 13; color: black; background: #e1e1e1;"&gt;{&lt;SPAN style="color: red;"&gt;"error"&lt;/SPAN&gt;:&amp;nbsp;{&lt;SPAN style="color: red;"&gt;"message"&lt;/SPAN&gt;:&amp;nbsp;&lt;SPAN style="color: red;"&gt;"Invalid&amp;nbsp;or&amp;nbsp;missing&amp;nbsp;input&amp;nbsp;parameters."&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN style="color: red;"&gt;"code"&lt;/SPAN&gt;:&amp;nbsp;400,&amp;nbsp;&lt;SPAN style="color: red;"&gt;"details"&lt;/SPAN&gt;:&amp;nbsp;[&lt;SPAN style="color: red;"&gt;"Invalid&amp;nbsp;where&amp;nbsp;clause&amp;nbsp;specified"&lt;/SPAN&gt;]}}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 18:09:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147596#M13762</guid>
      <dc:creator>LisaT</dc:creator>
      <dc:date>2019-07-01T18:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: JavascriptAPI OR in query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147597#M13763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like they are doing more behind the scenes to limit queries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 18:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascriptapi-or-in-query/m-p/147597#M13763</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-01T18:20:06Z</dc:date>
    </item>
  </channel>
</rss>

