<?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: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206510#M543</link>
    <description>&lt;P&gt;Hey Oliver ,&lt;/P&gt;&lt;P&gt;can you share the attribute rules with the following information?&lt;/P&gt;&lt;P&gt;Attribute rule script:&lt;/P&gt;&lt;P&gt;Attribute rules properties (whether its excluded from client eval, triggers etc.. )&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pro release:&lt;/P&gt;&lt;P&gt;Server Release:&lt;/P&gt;&lt;P&gt;SQL Server release:&lt;/P&gt;&lt;P&gt;Dataset registration (unversioned/branch/ traditional)&lt;/P&gt;&lt;P&gt;Fiddler logs (if Exclude from client evaluation is disabled (unchecked) )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I couldn't reproduce on my end,&amp;nbsp; creating a feature with the rule succeeds on my sqlserver instance with latest software succeeds. It could be a bug in specific version of the software but hard to tell without a specific repro.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2022 20:10:43 GMT</pubDate>
    <dc:creator>HusseinNasser2</dc:creator>
    <dc:date>2022-08-25T20:10:43Z</dc:date>
    <item>
      <title>ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206459#M540</link>
      <description>&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having a real strange issue with pro, Pro doesn't let me save an attribute rule with correct sql syntax in a filter statement,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Only can save the attribute rule using the dates in this format
var d_start_date =  Date(this_year,03,16,07,0,0,0)
var d_end_date = Date(this_year,08,30,30,59,59,999)
// instead of correct sql filter syntax for filter below
var d_start_date_sql =  Text(Date(this_year,03,16,07,0,0,0))
var d_end_date_sql = Text(Date(this_year,08,30,30,59,59,999))
	var filter_statement = 'guid = &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/58275"&gt;@CB&lt;/a&gt;_gid AND cleaning_now_or_later = @clean_now AND inspection_date &amp;gt;= @d_start_date_sql  AND inspection_date &amp;lt;= @d_end_date_sql'
 
// however, for the statement below using these variable is fine, and can save no issue 
var year_beginning_date = Text(Date(this_year,00,02,-16,00,00,00))
var year_end_date = Text(Date(this_year,11,31,31,59,59,999))
	var filter_statement = 'guid = &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/58275"&gt;@CB&lt;/a&gt;_gid AND cleaning_now_or_later = @clean_now AND inspection_date &amp;gt; @year_beginning_date AND inspection_date &amp;lt; @year_end_date'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is the error I get in pro when trying to save with the sql syntax&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="OliverSandoval_p_1-1661449727686.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49476i0EB7CC676D7DADC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="OliverSandoval_p_1-1661449727686.png" alt="OliverSandoval_p_1-1661449727686.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when I test the attribute rule from registered feature service, I get this error in the server logs when the incorrect sql syntax is used, so I know its those incorrect variables&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OliverSandoval_p_0-1661449249393.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49473iD1D0F29D0D3DE029/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OliverSandoval_p_0-1661449249393.png" alt="OliverSandoval_p_0-1661449249393.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would love to get your input Hussein Nasser, Xander Bakker or Aaron Pulver! But it looks like I cant tag you unless you've replied.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 18:07:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206459#M540</guid>
      <dc:creator>OliverSandoval_p</dc:creator>
      <dc:date>2022-08-25T18:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206470#M541</link>
      <description>&lt;P&gt;if you remove "Text" function and send native dates it works for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HusseinNasser2_0-1661451570279.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49481i65F5A0CCD1E968BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HusseinNasser2_0-1661451570279.png" alt="HusseinNasser2_0-1661451570279.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when the text function is there the template replacement gets confused with the data type. Let me know if that works&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HusseinNasser2_1-1661451618393.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49482i6988D97F6288BD50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HusseinNasser2_1-1661451618393.png" alt="HusseinNasser2_1-1661451618393.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 18:20:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206470#M541</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2022-08-25T18:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206478#M542</link>
      <description>&lt;P&gt;Hi Hussein! Thank you for your quick response! I removed the text function and it allows me to save, however, the attribute rule fails when using a registered feature layer, i get this error message in the arcgis server manager logs next to the native date used in the filter&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OliverSandoval_p_0-1661452654217.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/49483iEFD20B89BF9BC061/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OliverSandoval_p_0-1661452654217.png" alt="OliverSandoval_p_0-1661452654217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 18:38:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206478#M542</guid>
      <dc:creator>OliverSandoval_p</dc:creator>
      <dc:date>2022-08-25T18:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206510#M543</link>
      <description>&lt;P&gt;Hey Oliver ,&lt;/P&gt;&lt;P&gt;can you share the attribute rules with the following information?&lt;/P&gt;&lt;P&gt;Attribute rule script:&lt;/P&gt;&lt;P&gt;Attribute rules properties (whether its excluded from client eval, triggers etc.. )&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pro release:&lt;/P&gt;&lt;P&gt;Server Release:&lt;/P&gt;&lt;P&gt;SQL Server release:&lt;/P&gt;&lt;P&gt;Dataset registration (unversioned/branch/ traditional)&lt;/P&gt;&lt;P&gt;Fiddler logs (if Exclude from client evaluation is disabled (unchecked) )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I couldn't reproduce on my end,&amp;nbsp; creating a feature with the rule succeeds on my sqlserver instance with latest software succeeds. It could be a bug in specific version of the software but hard to tell without a specific repro.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 20:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206510#M543</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2022-08-25T20:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206542#M544</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Hussein,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have all of the information except the fiddler logs, Ive been testing in field maps, but ill have to create&amp;nbsp; a web app to edit the associated related table to get the logs. Or is there something else I can do? If not no prob. Ill direct message&amp;nbsp; you all the info you requested.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 21:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206542#M544</guid>
      <dc:creator>OliverSandoval_p</dc:creator>
      <dc:date>2022-08-25T21:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206547#M545</link>
      <description>&lt;P&gt;Yes that would be helpful thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know where the problem actually is and fiddler log will help (fields map might be sending incorrect request and I want to capture that),&amp;nbsp;&lt;/P&gt;&lt;P&gt;try reproducing in Pro, do the same edit there and see if you see the behavior.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try excluding from application eval too and test again in fields map ,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 21:13:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1206547#M545</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2022-08-25T21:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: ATTRIBUTE RULE SAVE BUG ISSUE SQL FILTER STATEMENT</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1215313#M580</link>
      <description>&lt;P&gt;After lots of trials and error, I was able to narrow it down to a bug within ArcGIS Pro,&lt;/P&gt;&lt;P&gt;For our niche very unique script, Pro bugs out when trying to save the attribute rule with Text(date()) variables in a SQL Filter statement. It only lets me save the rule when the feature class has no features with any of the attributes referenced in the script's if statement. Extremely weird and inconvenient lol. The Text(date()) format is required for the rule to work from a registered feature class i.e. when used in Field Maps.&amp;nbsp;&lt;BR /&gt;The work around is&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Field Calculate placeholder attributes into the field in order to save the attribute rule,&lt;/LI&gt;&lt;LI&gt;Disable the rule&lt;/LI&gt;&lt;LI&gt;Then field calculate the correct values back in the field&lt;/LI&gt;&lt;LI&gt;Enable rule&lt;/LI&gt;&lt;LI&gt;Publish registered feature service&lt;/LI&gt;&lt;LI&gt;work fine in Field Maps&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Despite this work around, any editing process done in Pro unrelated will not work as the rule will be triggered and only works from a feature service. So additional steps to the work around will need to be planned when working with an enterprise production database.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 22:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/attribute-rule-save-bug-issue-sql-filter-statement/m-p/1215313#M580</guid>
      <dc:creator>OliverSandoval_p</dc:creator>
      <dc:date>2022-09-22T22:24:08Z</dc:date>
    </item>
  </channel>
</rss>

