<?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: calculated attribute rule in batch - in weblayer with un - doesn't work in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/calculated-attribute-rule-in-batch-in-weblayer/m-p/1298817#M970</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/616145"&gt;@gpgisandsky&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Wanted add a few comments and ask some questions.&lt;BR /&gt;&lt;BR /&gt;On your question "&lt;SPAN&gt;Why the classx name has been translate in a code?" this is translated&amp;nbsp;to the Portal ID number for security reasons.&lt;BR /&gt;&lt;BR /&gt;Also a few comments on the code.&amp;nbsp; In your original code it is recommended&amp;nbsp;to not use the database fully qualified dataset name for your $datastore tile. It is also recommended&amp;nbsp;to specify&amp;nbsp;only the fields you need instead of the '*' wildcard as well as set the get geometry to false if you are not modifying it (getting a intersect is not a modification so still works with false).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Questions, I have is have you tested the rule in a non enterprise environment such as a file geodatabase to test functionality. Testing this way can eliminate the AGE as a contributing factor.&lt;BR /&gt;&lt;BR /&gt;I tested your code on my own data in a fgdb and did not see the same issue. I'm interested to know your experience with it.&lt;BR /&gt;&lt;BR /&gt;~ Jake&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2023 19:37:50 GMT</pubDate>
    <dc:creator>Jake_S</dc:creator>
    <dc:date>2023-06-13T19:37:50Z</dc:date>
    <item>
      <title>calculated attribute rule in batch - in weblayer with un - doesn't work</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calculated-attribute-rule-in-batch-in-weblayer/m-p/1298679#M969</link>
      <description>&lt;P&gt;I published a weblayer where there are my UN layers and my device feature class has a attribute rules. Also there are GDB_Validation&amp;lt;Point/Line/Polygon&amp;gt;Errors and GDB_ValidationObject feature classes/table.&lt;/P&gt;&lt;P&gt;On &lt;STRONG&gt;device&lt;/STRONG&gt; feature class there is a calculation rules in batch:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;arcade code assigned to device before share weblayer&lt;/P&gt;&lt;P&gt;var timestart=Now()&lt;BR /&gt;var pointGeometry = Geometry($feature)&lt;BR /&gt;var fsPolygon = FeatureSetByName($datastore,"dbname.sde.classx",["*"], true)&lt;BR /&gt;var polygonGeometry = First (Intersects(fsPolygon, pointGeometry))&lt;BR /&gt;if (polygonGeometry == null) return "nessuno"&lt;BR /&gt;return polygonGeometry.COMUNE + ' exec.' + DateDiff(Now(),timestart,'milliseconds') + 'ms'&lt;/P&gt;&lt;P&gt;arcade code assigned to device within weblayer (after share as weblayer)&lt;/P&gt;&lt;P&gt;var timestart=Now()&lt;BR /&gt;var pointGeometry = Geometry($feature)&lt;BR /&gt;var fsPolygon = FeatureSetByName($datastore,"{FA346ECC-9B15-42D9-B690-CE97B5089E03}",["*"], true)&lt;BR /&gt;var polygonGeometry = First (Intersects(fsPolygon, pointGeometry))&lt;BR /&gt;if (polygonGeometry == null) return "nessuno"&lt;BR /&gt;return polygonGeometry.COMUNE + ' exec.' + DateDiff(Now(),timestart,'milliseconds') + 'ms'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The Arcade code use a feature class (&lt;STRONG&gt;classx&lt;/STRONG&gt;) that exist in my enterprise geodatabase (the some where there are the feature class that I used in weblayer) isn't included in the weblayer (like&amp;nbsp;&lt;SPAN&gt;class1,class2, class3 example on&amp;nbsp;&lt;A href="https://community.esri.com/t5/attribute-rules-blog/attribute-rules-exclude-from-application/ba-p/1016604" target="_self"&gt;https://community.esri.com/t5/attribute-rules-blog/attribute-rules-exclude-from-application/ba-p/1016604&lt;/A&gt;&amp;nbsp;example&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;In the calculation attribute rule there are the text error and number string. I tried to use rules with "exclude from application evaluation" option and without it too.&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;classx&lt;/STRONG&gt; is registered as branch version and validation feature class like other feature and the weblayer has been published using version managment and validation option.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_0-1686674657785.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73061iE5C28510077C730D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_0-1686674657785.png" alt="gpgisandsky_0-1686674657785.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when I consume within arcgis pro the weblayer and I try to add a feature within&amp;nbsp;&lt;STRONG&gt;device &lt;/STRONG&gt;the element is added but&amp;nbsp; the field "COMUNE" is empty and no errors appear. Maybe the rule was never executed. Why the classx name has been translate in a code? Which log I can control to understand and solve this issue?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_1-1686674793643.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73062iAA46F25AD322241C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_1-1686674793643.png" alt="gpgisandsky_1-1686674793643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;SW: Pro 3.1.1/AGS with federated Portal11.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 17:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calculated-attribute-rule-in-batch-in-weblayer/m-p/1298679#M969</guid>
      <dc:creator>gpgisandsky</dc:creator>
      <dc:date>2023-06-13T17:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: calculated attribute rule in batch - in weblayer with un - doesn't work</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/calculated-attribute-rule-in-batch-in-weblayer/m-p/1298817#M970</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/616145"&gt;@gpgisandsky&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Wanted add a few comments and ask some questions.&lt;BR /&gt;&lt;BR /&gt;On your question "&lt;SPAN&gt;Why the classx name has been translate in a code?" this is translated&amp;nbsp;to the Portal ID number for security reasons.&lt;BR /&gt;&lt;BR /&gt;Also a few comments on the code.&amp;nbsp; In your original code it is recommended&amp;nbsp;to not use the database fully qualified dataset name for your $datastore tile. It is also recommended&amp;nbsp;to specify&amp;nbsp;only the fields you need instead of the '*' wildcard as well as set the get geometry to false if you are not modifying it (getting a intersect is not a modification so still works with false).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Questions, I have is have you tested the rule in a non enterprise environment such as a file geodatabase to test functionality. Testing this way can eliminate the AGE as a contributing factor.&lt;BR /&gt;&lt;BR /&gt;I tested your code on my own data in a fgdb and did not see the same issue. I'm interested to know your experience with it.&lt;BR /&gt;&lt;BR /&gt;~ Jake&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 19:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/calculated-attribute-rule-in-batch-in-weblayer/m-p/1298817#M970</guid>
      <dc:creator>Jake_S</dc:creator>
      <dc:date>2023-06-13T19:37:50Z</dc:date>
    </item>
  </channel>
</rss>

