<?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 ArcGIS Enterprise Query widgets fails on datefield from a view in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/arcgis-enterprise-query-widgets-fails-on-datefield/m-p/1552725#M23645</link>
    <description>&lt;P&gt;ArcGIS Enterprise 11.1&lt;/P&gt;&lt;P&gt;When querying a date-field in a view I get an error and in ArcGIS server log I get the same error as this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en-us/knowledge-base/rest-query-on-the-date-field-no-longer-works-after-upgr-000011867" target="_blank" rel="noopener"&gt;https://support.esri.com/en-us/knowledge-base/rest-query-on-the-date-field-no-longer-works-after-upgr-000011867&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I've tested the parameter change explained in the above link and it works if I do that. However that is a security issue and I'd rather not do that in an environment that's available online.&lt;/P&gt;&lt;P&gt;The error in ArcGIS Server log:&lt;BR /&gt;&lt;SPAN&gt;An invalid where clause or definition expression has been requested: "inflyttningsdatum &amp;gt;= '2024-10-02 22:00:00' AND inflyttningsdatum &amp;lt; '2024-10-31 23:00:00'"&lt;/SPAN&gt;&lt;BR /&gt;When testing in the rest-interface query it works if I add DATE before the date as in DATE '2024-10-02 22:00:00'&lt;/P&gt;&lt;P&gt;The view is located in an SQLSERVER sde-database and the view is registered with the database. The view reads data from another SQLSERVER database(not sde). The original data is in a STRING-field on the format YYYYMMDD. In the view I cast this data to a DATE-field (cast(inflyttdat as date) as inflyttningsdatum). I've also tried a casting to a datetime2-field.&lt;/P&gt;&lt;P&gt;Should the query widget be able to query date-fields in views? Is the way I have created the view(with a cast) not supported?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2024 12:12:29 GMT</pubDate>
    <dc:creator>LarsMagnusson</dc:creator>
    <dc:date>2024-10-28T12:12:29Z</dc:date>
    <item>
      <title>ArcGIS Enterprise Query widgets fails on datefield from a view</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/arcgis-enterprise-query-widgets-fails-on-datefield/m-p/1552725#M23645</link>
      <description>&lt;P&gt;ArcGIS Enterprise 11.1&lt;/P&gt;&lt;P&gt;When querying a date-field in a view I get an error and in ArcGIS server log I get the same error as this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en-us/knowledge-base/rest-query-on-the-date-field-no-longer-works-after-upgr-000011867" target="_blank" rel="noopener"&gt;https://support.esri.com/en-us/knowledge-base/rest-query-on-the-date-field-no-longer-works-after-upgr-000011867&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I've tested the parameter change explained in the above link and it works if I do that. However that is a security issue and I'd rather not do that in an environment that's available online.&lt;/P&gt;&lt;P&gt;The error in ArcGIS Server log:&lt;BR /&gt;&lt;SPAN&gt;An invalid where clause or definition expression has been requested: "inflyttningsdatum &amp;gt;= '2024-10-02 22:00:00' AND inflyttningsdatum &amp;lt; '2024-10-31 23:00:00'"&lt;/SPAN&gt;&lt;BR /&gt;When testing in the rest-interface query it works if I add DATE before the date as in DATE '2024-10-02 22:00:00'&lt;/P&gt;&lt;P&gt;The view is located in an SQLSERVER sde-database and the view is registered with the database. The view reads data from another SQLSERVER database(not sde). The original data is in a STRING-field on the format YYYYMMDD. In the view I cast this data to a DATE-field (cast(inflyttdat as date) as inflyttningsdatum). I've also tried a casting to a datetime2-field.&lt;/P&gt;&lt;P&gt;Should the query widget be able to query date-fields in views? Is the way I have created the view(with a cast) not supported?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2024 12:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/arcgis-enterprise-query-widgets-fails-on-datefield/m-p/1552725#M23645</guid>
      <dc:creator>LarsMagnusson</dc:creator>
      <dc:date>2024-10-28T12:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Enterprise Query widgets fails on datefield from a view</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/arcgis-enterprise-query-widgets-fails-on-datefield/m-p/1567329#M23678</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; This worked great for me!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 16:42:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/arcgis-enterprise-query-widgets-fails-on-datefield/m-p/1567329#M23678</guid>
      <dc:creator>KirkWebb</dc:creator>
      <dc:date>2024-12-11T16:42:12Z</dc:date>
    </item>
  </channel>
</rss>

