<?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: FeatureLayer setDefinitionExpression &amp; Internet Explorer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462334#M42743</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because it's IE - isn't that answer enough?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've sometimes had luck switching the use of single quote ' vs double quote " in my where clauses.&amp;nbsp; Maybe that will make IE happier. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; theDefExp = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;'endDate &amp;gt; date "'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; + today.toLocaleDateString() + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;'"'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Sep 2015 21:14:40 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2015-09-28T21:14:40Z</dc:date>
    <item>
      <title>FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462333#M42742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This strikes me as odd but I guess it really shouldn't since this is Internet Explorer..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, I have a simple page that loads two feature layers that have two date fields (a beginning and ending date for events). When I add the layers to my map, I attempt to apply a defintion expression based on those date fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var today = new Date();
var theDefExp = "endDate &amp;gt; date '" + today.toLocaleDateString() + "'";
theLayer.setDefinitionExpression(theDefExp);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine in Chrome and Firefox but, under Internet Explorer 11 (and using any "previous" document modes), this throws 400 errors when it actually attempts to display features. In the ArcGIS Server logs, here's the real error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;An invalid where clause or definition expression has been requested: "endDate &amp;gt; date '‎9‎/‎28‎/‎2015'"&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So why does this cause heartburn for IE but not Chrome/Firefox? More importantly, what do I need to change to make it IE friendly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:32:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462333#M42742</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-11T20:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462334#M42743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because it's IE - isn't that answer enough?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've sometimes had luck switching the use of single quote ' vs double quote " in my where clauses.&amp;nbsp; Maybe that will make IE happier. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; theDefExp = &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;'endDate &amp;gt; date "'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; + today.toLocaleDateString() + &lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;'"'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 21:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462334#M42743</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-09-28T21:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462335#M42744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sadly, no. I'm also trying the actual Epoch numbers but that isn't working either:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;"endDate &amp;gt; date 1443476100"&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 21:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462335#M42744</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-09-28T21:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462336#M42745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured that was too easy, but the position of those quotes can be a deal break.&amp;nbsp; Are you sure it's lower case d on 'date'?&amp;nbsp; Case is the sort of thing that other browsers ignore, but IE chokes on.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 21:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462336#M42745</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-09-28T21:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462337#M42746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no- capital D did not make it work. Also- using a double quote makes Chrome/Firefox not work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 21:51:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462337#M42746</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-09-28T21:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462338#M42747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing I will add is that I do notice a subtle difference in the request that is sent on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chrome:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/rest/services/transportation/constructionClosures/MapServer/0/query?f=json&amp;amp;where=endDate%20%3E%3D%20date%20%279%2F28%2F2015%27&amp;amp;returnGeometry=true&amp;amp;...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Internet Explorer:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server&amp;gt;/rest/services/transportation/constructionClosures/MapServer/0/query?f=json&amp;amp;where=endDate%20%3E%3D%20date%20'%E2%80%8E9%E2%80%8E%2F%E2%80%8E28%E2%80%8E%2F%E2%80%8E2015'&amp;amp;returnGeometry=true&amp;amp;...&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Internet Explorer is retaining the single quotes for the specifed date but Chrome seems to be removing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 22:39:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462338#M42747</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-09-28T22:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462339#M42748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you copy the Chrome request and run it in IE, do you get a response then?&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use where clauses a lot, but unfortunately I don't have any experiences specifically with date fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 18:32:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462339#M42748</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-09-29T18:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462340#M42749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was a good suggestions. Pasting the Chrome request into IE yields successful results but pasting the IE request into Chrome returns the 400 error. IE is doing something to the request that is getting passed on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 15:00:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462340#M42749</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-09-30T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462341#M42750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a tough thing to track down, nothing but generic kinds of words to do a search on.&amp;nbsp;&amp;nbsp; I wonder if there is anything in the IE settings that is effecting it.&amp;nbsp;&amp;nbsp; Could there be anything in the AGS forums related to the request itself that talks about the differences between browsers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 15:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462341#M42750</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-09-30T15:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462342#M42751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I debated whether to post this question here or in the AGS forum. I think I'll try a post over there as well. Maybe someone actually from ESRI would chime in. Thanks for the suggestions, though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 16:57:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462342#M42751</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-09-30T16:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer setDefinitionExpression &amp; Internet Explorer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462343#M42752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just got off the phone with ESRI after submitting a possible bug request about this. After a lengthy call, we finally determined that the issue was not with ESRI's software. The problem lies with my use of the Date.toLocaleDateString() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For whatever reason, the encoding must be different or something. The final solution was a little less elegant but it now works within IE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var currentTime = new Date();
&amp;nbsp;&amp;nbsp;&amp;nbsp; var month = currentTime.getMonth() + 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var day = currentTime.getDate();
&amp;nbsp;&amp;nbsp;&amp;nbsp; var year = currentTime.getFullYear();
&amp;nbsp;&amp;nbsp;&amp;nbsp; var theCurDate = month + "/" + day + "/" + year;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var theDefExp = "endDate &amp;gt;= date '" + theCurDate + "'";
&amp;nbsp;&amp;nbsp;&amp;nbsp; theLayer.setDefinitionExpression(theDefExp);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-setdefinitionexpression-internet/m-p/462343#M42752</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2021-12-11T20:33:01Z</dc:date>
    </item>
  </channel>
</rss>

