<?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 Dynamic date filtering on layer from sql local server problem in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filtering-on-layer-from-sql-local/m-p/182233#M8982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a layer on a local sql 2008 r2 server. The layer is presented&amp;nbsp;on an arcgis online&amp;nbsp;web map and I want to dynamically filter it by the date field,&amp;nbsp;so it will not show the last week observations.&lt;/P&gt;&lt;P&gt;I've tried to work by this tutorial -&amp;nbsp;&lt;A href="https://community.esri.com/docs/DOC-8191"&gt;Dynamic Date Filter&lt;/A&gt;&amp;nbsp; , and trough the AGOL Assistant to change the &lt;SPAN style="background-color: #ffffff;"&gt;definitionExpression&lt;/SPAN&gt;&amp;nbsp;with a variety of expressions, &amp;nbsp;and each time it's show an error - "Data access failed".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there's some of the expressions I've treied (with or without brackets, with CURRENT_TIMESTAMP, &amp;nbsp;CURRENT_DATE or the GETDATE expressions):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #4d4d4c; background: #ffffff; border: 1px solid #cccccc; margin: 0px 0px 10px; padding: 0.5em;"&gt;&lt;SPAN class="" style="color: #718c00;"&gt; "&lt;SPAN class="" style="color: #c82829;"&gt;definitionExpression&lt;/SPAN&gt;": "ObsDate NOT BETWEEN CURRENT_TIMESTAMP - 7 AND CURRENT_TIMESTAMP"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class="" style="color: #4d4d4c; background: #ffffff; border: 1px solid #cccccc; margin: 0px 0px 10px; padding: 0.5em;"&gt;&lt;SPAN class="" style="color: #718c00;"&gt;"&lt;SPAN class="" style="color: #c82829;"&gt;definitionExpression&lt;/SPAN&gt;": "ObsDate &amp;lt; CURRENT_TIMESTAMP - 7"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class="" style="color: #4d4d4c; background: #ffffff; border: 1px solid #cccccc; margin: 0px 0px 10px; padding: 0.5em;"&gt;&lt;SPAN class="" style="color: #718c00;"&gt;"&lt;SPAN class="" style="color: #c82829;"&gt;definitionExpression&lt;/SPAN&gt;": "ObsDate BETWEEN convert(date, GETDATE()-7) AND convert(date, GETDATE())"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jul 2017 07:19:10 GMT</pubDate>
    <dc:creator>SPNIOrganization</dc:creator>
    <dc:date>2017-07-04T07:19:10Z</dc:date>
    <item>
      <title>Dynamic date filtering on layer from sql local server problem</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filtering-on-layer-from-sql-local/m-p/182233#M8982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a layer on a local sql 2008 r2 server. The layer is presented&amp;nbsp;on an arcgis online&amp;nbsp;web map and I want to dynamically filter it by the date field,&amp;nbsp;so it will not show the last week observations.&lt;/P&gt;&lt;P&gt;I've tried to work by this tutorial -&amp;nbsp;&lt;A href="https://community.esri.com/docs/DOC-8191"&gt;Dynamic Date Filter&lt;/A&gt;&amp;nbsp; , and trough the AGOL Assistant to change the &lt;SPAN style="background-color: #ffffff;"&gt;definitionExpression&lt;/SPAN&gt;&amp;nbsp;with a variety of expressions, &amp;nbsp;and each time it's show an error - "Data access failed".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there's some of the expressions I've treied (with or without brackets, with CURRENT_TIMESTAMP, &amp;nbsp;CURRENT_DATE or the GETDATE expressions):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #4d4d4c; background: #ffffff; border: 1px solid #cccccc; margin: 0px 0px 10px; padding: 0.5em;"&gt;&lt;SPAN class="" style="color: #718c00;"&gt; "&lt;SPAN class="" style="color: #c82829;"&gt;definitionExpression&lt;/SPAN&gt;": "ObsDate NOT BETWEEN CURRENT_TIMESTAMP - 7 AND CURRENT_TIMESTAMP"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class="" style="color: #4d4d4c; background: #ffffff; border: 1px solid #cccccc; margin: 0px 0px 10px; padding: 0.5em;"&gt;&lt;SPAN class="" style="color: #718c00;"&gt;"&lt;SPAN class="" style="color: #c82829;"&gt;definitionExpression&lt;/SPAN&gt;": "ObsDate &amp;lt; CURRENT_TIMESTAMP - 7"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class="" style="color: #4d4d4c; background: #ffffff; border: 1px solid #cccccc; margin: 0px 0px 10px; padding: 0.5em;"&gt;&lt;SPAN class="" style="color: #718c00;"&gt;"&lt;SPAN class="" style="color: #c82829;"&gt;definitionExpression&lt;/SPAN&gt;": "ObsDate BETWEEN convert(date, GETDATE()-7) AND convert(date, GETDATE())"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 07:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filtering-on-layer-from-sql-local/m-p/182233#M8982</guid>
      <dc:creator>SPNIOrganization</dc:creator>
      <dc:date>2017-07-04T07:19:10Z</dc:date>
    </item>
  </channel>
</rss>

