<?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: Definition Expression Fails When Using &amp;lt;&amp;gt; Operator in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259520#M80311</link>
    <description>&lt;P&gt;It's funny how a simple question can shake something important loose:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.apply = function () {
    console.log(self.queryEditor.innerHTML); // prints "Status &amp;amp;lt;&amp;amp;gt; 'Open'"
    featureLayer.definitionExpression = self.queryEditor.innerHTML;
    featureTable.refresh();
};&lt;/LI-CODE&gt;&lt;P&gt;Now obviously, changing that from innerHTML to innerText yields:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.apply = function () {
    console.log(self.queryEditor.innerText); // prints "Status &amp;lt;&amp;gt; 'Open'"
    featureLayer.definitionExpression = self.queryEditor.innerText;
    featureTable.refresh();
};&lt;/LI-CODE&gt;&lt;P&gt;And this works as expected.&lt;/P&gt;&lt;P&gt;Thanks for the nudge.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 20:07:18 GMT</pubDate>
    <dc:creator>MichaelCollinsGIS</dc:creator>
    <dc:date>2023-02-17T20:07:18Z</dc:date>
    <item>
      <title>Definition Expression Fails When Using &lt;&gt; Operator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259485#M80307</link>
      <description>&lt;P&gt;Hi All:&lt;/P&gt;&lt;P&gt;I want to be able to programmaticaly apply a "&amp;lt;&amp;gt;" operator to a definition expression. Nothing complicated, just something like layer.definitionExpression = "Status &amp;lt;&amp;gt; 'Closed'" because I don't want to include an OR clause in the query.&lt;/P&gt;&lt;P&gt;The error that I get is&amp;nbsp;&lt;SPAN&gt;"'where' parameter is invalid" however if I try to apply the same query to the REST endpoint it returns the data fine. I tried encoding the string manually and also using&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;encodeURIComponent, but neither worked.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Anyone have any idea what I am doing wrong?&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;MTC&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 19:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259485#M80307</guid>
      <dc:creator>MichaelCollinsGIS</dc:creator>
      <dc:date>2023-02-17T19:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Expression Fails When Using &lt;&gt; Operator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259491#M80308</link>
      <description>&lt;P&gt;Use "!=" instead of "&amp;lt;&amp;gt;"&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 19:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259491#M80308</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-02-17T19:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Expression Fails When Using &lt;&gt; Operator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259495#M80309</link>
      <description>&lt;P&gt;Unfortunately, I tried that too. No avail.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichaelCollinsGIS_0-1676661777929.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63140i5949AF6A783CCBED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichaelCollinsGIS_0-1676661777929.png" alt="MichaelCollinsGIS_0-1676661777929.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 19:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259495#M80309</guid>
      <dc:creator>MichaelCollinsGIS</dc:creator>
      <dc:date>2023-02-17T19:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Expression Fails When Using &lt;&gt; Operator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259513#M80310</link>
      <description>&lt;P&gt;Yeah, that's definitely incorrect. I should have tested it first. However, using "&amp;lt;&amp;gt;" in a definitionExpression works when added to &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer/" target="_self"&gt;this sample&lt;/A&gt;.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const featureLayer = new FeatureLayer({
  url: "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0"
});
map.add(featureLayer);      
featureLayer.definitionExpression = "Cmn_Name &amp;lt;&amp;gt; 'White oak'";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Can you provide more code to replicate the problem?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 19:58:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259513#M80310</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-02-17T19:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Expression Fails When Using &lt;&gt; Operator</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259520#M80311</link>
      <description>&lt;P&gt;It's funny how a simple question can shake something important loose:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.apply = function () {
    console.log(self.queryEditor.innerHTML); // prints "Status &amp;amp;lt;&amp;amp;gt; 'Open'"
    featureLayer.definitionExpression = self.queryEditor.innerHTML;
    featureTable.refresh();
};&lt;/LI-CODE&gt;&lt;P&gt;Now obviously, changing that from innerHTML to innerText yields:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.apply = function () {
    console.log(self.queryEditor.innerText); // prints "Status &amp;lt;&amp;gt; 'Open'"
    featureLayer.definitionExpression = self.queryEditor.innerText;
    featureTable.refresh();
};&lt;/LI-CODE&gt;&lt;P&gt;And this works as expected.&lt;/P&gt;&lt;P&gt;Thanks for the nudge.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 20:07:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/definition-expression-fails-when-using-lt-gt/m-p/1259520#M80311</guid>
      <dc:creator>MichaelCollinsGIS</dc:creator>
      <dc:date>2023-02-17T20:07:18Z</dc:date>
    </item>
  </channel>
</rss>

