<?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: Format for Queries Connected with AND/OR in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393505#M36312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah sorry I didn't see the other response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it was just the proper placement of the quotation marks, but especially that extra space that you pointed out really did it. Now it's working like a charm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Jun 2011 23:52:53 GMT</pubDate>
    <dc:creator>ChrisFarver</dc:creator>
    <dc:date>2011-06-04T23:52:53Z</dc:date>
    <item>
      <title>Format for Queries Connected with AND/OR</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393500#M36307</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'm having a bit of trouble trying to find the correct format for connecting two queries together with AND. I feel I've tried so many different combinations, but haven't found a way that works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I'm trying to code is a query that searches through a list of houses/apartments by a specified range. At first I was using&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.where = "3_bedrooms &amp;lt;= " + rent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But found that it would return a lot of properties, as many were initialized to having a rent of 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried combining statements along the lines of &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.where = "3_bedrooms &amp;gt; " + 0 + "AND 3_bedrooms &amp;lt;= " + rent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And many other variations of this line, but nothing seems to work. Been searching online for the correct format, but haven't found anything yet. Can anyone help me out?&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, 19 May 2011 21:40:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393500#M36307</guid>
      <dc:creator>ChrisFarver</dc:creator>
      <dc:date>2011-05-19T21:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format for Queries Connected with AND/OR</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393501#M36308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I find the best place to test these things out is at your REST endpoint. You can play around with different syntax to see what actually works and then drop that in your app. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing about the where clause you posted:&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 = "3_bedrooms &amp;gt; " + 0 + "AND 3_bedrooms &amp;lt;= " + rent;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you need another space before your AND:&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 = "3_bedrooms &amp;gt; " + 0 + " AND 3_bedrooms &amp;lt;= " + rent;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit:&amp;nbsp; just to confirm, the datatype of the 3_bedrooms field is not a string, right?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 22:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393501#M36308</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-05-19T22:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Format for Queries Connected with AND/OR</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393502#M36309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Correct, the datatype for 3_bedrooms is an integer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Correction: Got it to work. Thanks for the help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 22:35:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393502#M36309</guid>
      <dc:creator>ChrisFarver</dc:creator>
      <dc:date>2011-05-19T22:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Format for Queries Connected with AND/OR</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393503#M36310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out the where clause and the results here:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSWells/MapServer/0/query?&amp;amp;where=SECTION+%3E+0+and+SECTION+%3C%3D+2&amp;amp;returnGeometry=false&amp;amp;outFields=section&amp;amp;f=html"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSWells/MapServer/0/query?&amp;amp;where=SECTION+%3E+0+and+SECTION+%3C%3D+2&amp;amp;returnGeometry=false&amp;amp;outFields=section&amp;amp;f=html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The where clause being used is:&amp;nbsp; SECTION &amp;gt; 0 and SECTION &amp;lt;= 2&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 23:45:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393503#M36310</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-05-19T23:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Format for Queries Connected with AND/OR</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393504#M36311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to help. Care to elaborate on what fixed it for you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2011 00:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393504#M36311</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-05-20T00:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Format for Queries Connected with AND/OR</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393505#M36312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah sorry I didn't see the other response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it was just the proper placement of the quotation marks, but especially that extra space that you pointed out really did it. Now it's working like a charm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2011 23:52:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/format-for-queries-connected-with-and-or/m-p/393505#M36312</guid>
      <dc:creator>ChrisFarver</dc:creator>
      <dc:date>2011-06-04T23:52:53Z</dc:date>
    </item>
  </channel>
</rss>

