<?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: Problems trying to implement attribute rule example in Pro documentation in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323986#M14118</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aha this is a little bit tricky. I will attempt to write the basic version of this but there are so many edge cases that this script doesn't solve. (Moving feature, deleting a bunch of features at once) .. But this is just a start.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two classes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;polygonClass&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pointClass&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the pointClass add an attribute rule on insert&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//on insert &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;//check if we are intersecting a polygon. If yes, set the hasPoint field on the polygon to Yes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPolygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectedPolygons &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Intersects &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPolygon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; polygonFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; intersectedPolygons&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// no polygon intersected found , quit..&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//we found a polygon feature set its HasPoint to Yes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="string token"&gt;"result"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
          &lt;SPAN class="string token"&gt;"edit"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"className"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"updates"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                                          &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; polygonFeature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalId&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"attributes"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"hasPoint"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"yes"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                                      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                            &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the pointClass add another attribute rule on Delete&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//on delete&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;//check if we are intersecting a polygon. If yes, make sure we are the last point, if yes set hasPoint to No!&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPolygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectedPolygons &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Intersects &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPolygon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; polygonFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; intersectedPolygons&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// no polygon intersected found , quit..&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//query the pointClass&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; pointGlobalId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalid&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPoint &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"pointClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectedPoints &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Filter&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Intersects &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPoint&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Geometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"globalId &amp;lt;&amp;gt; @pointGlobalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// find all points that are not me in the polygon&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//there are still few points, quit!&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;intersectedPoints&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field

&lt;SPAN class="comment token"&gt;//$feature was the last point, .. set hasPoint to No&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//we found a polygon feature set its HasPoint to Yes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="string token"&gt;"result"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
          &lt;SPAN class="string token"&gt;"edit"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"className"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"updates"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                                          &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; polygonFeature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalId&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"attributes"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"hasPoint"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"no"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                                      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                            &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/479493_deleteinsert.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:23:13 GMT</pubDate>
    <dc:creator>HusseinNasser2</dc:creator>
    <dc:date>2021-12-11T15:23:13Z</dc:date>
    <item>
      <title>Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323975#M14107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to implement essentially the same functionality as in one of the examples in the Pro documentation at&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/attribute-rule-script-expression.htm" title="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/attribute-rule-script-expression.htm"&gt;Attribute rule script expression examples—Geodatabases | ArcGIS Desktop&lt;/A&gt;, specifically:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; fsStructureBoundary = FeatureSetByName($datastore, &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"Substation"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;, [&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"name"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;], &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; fsSubstation = Intersects(fsStructureBoundary, Geometry($feature)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; substation = First (fsSubstation) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; subname = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; (substation == &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; {&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"errorMessage"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"Transformers must be created in a substation."&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; subname = substation.name &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; subname + &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;" - "&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; + $feature.assetid;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Of course my feature class names are different, but when I validate the expression I get:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Invalid expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Error on line 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Table not found {FC}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;I've tried the FC name as it appears in the TOC, the name of the source FC in the geodatabase, and the full Database.DBO.FC source all with the same result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;What am I missing?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 14:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323975#M14107</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-24T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323976#M14108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That error means that FeatureSetByName could not find the table name &lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;{FC} &lt;/SPAN&gt;Means the table {FC} could not be found. Can you paste your script and a picture of your geodatabase schema?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The `$datastore` global in FeatureSetByName must be your geodatabase workspace, so make sure that the table Name you specify is the physical table name in your geodatabase not the layer name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Here is a video of the talk I gave back in Dev Summit 2019 in Attribute rules with demos from scratch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.esri.com/videos/watch?videoid=HuWymMh6igk" title="https://www.esri.com/videos/watch?videoid=HuWymMh6igk"&gt;Attribute Rules in Arcade Video | Esri&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 15:19:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323976#M14108</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2020-01-24T15:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323977#M14109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Hussein!&amp;nbsp; It looks like I had to get the FC name in there without the gdb.DBO. prefix AND get the field name containing the attribute in there to get it to recognize the table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The expression now checks as valid.&amp;nbsp; HOWEVER, when I go to save the "Applying changes" progress bar just rolls and rolls.&lt;BR /&gt;&lt;BR /&gt;Do these attribute rules have to be applied before services are published from these feature classes?&amp;nbsp; Does versioning/archiving have to be off?&amp;nbsp; Any details like that I should be aware of?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 17:35:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323977#M14109</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-24T17:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323978#M14110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you only add the "gdb.DBO." prefix if you are not the owner of the dataset. if you owner the dataset you can just use the name of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attribute rules are considered schema change so all connections should be closed before a change can be done.. this includes stopping services. (Exclusive lock required)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add them to any dataset with any registration type versioned or unversioned.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 18:05:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323978#M14110</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2020-01-24T18:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323979#M14111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Hussein!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quick clarification on the gdb.DBO thing - this rule is designed to take effect when other users add points to the FC thru Collector.&amp;nbsp; Since they aren't owners, do I need to explicitly put in the gdb.DBO, or is it only when authoring the rule where that applies?&amp;nbsp; In other words, once the rule is "in there" since I put it in and don't need the gdb.DBO, will it evaluate correctly when others insert points?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 18:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323979#M14111</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-24T18:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323980#M14112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assume you have a user called "gdb" and you connected to the workspace with "gdb" user , you can create the attribute rule using FeatureSetbyName (&amp;nbsp; "gdb.dbo.TreeTable" ). You can also just say FeatureSetbyName ( "TreeTable") (you can do that because gdb owns the table). Regardless what you write we will ALWAYS persist it internally fully qualified "gdb.dbo.TreeTable" If a user "test" try to connect to the workspace and tried to execute the attribute rule (made an edit) then it will query the table "gdb.dbo.TreeTable"&amp;nbsp; which means test must have access to the table&amp;nbsp;"gdb.dbo.TreeTable"&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 18:55:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323980#M14112</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2020-01-24T18:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323981#M14113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect.&amp;nbsp; Thank you for all your help.&amp;nbsp; One more for the road: How could I turn this script inside out and say "If a polygon contains a point from a specific fc, calculate a field attribute in the polygon fc to 'yes'"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 19:58:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323981#M14113</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-24T19:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323982#M14114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The correct way of implementing this is little bit more complicated. The easier way can be by having one rule on the polygon class that activates on insert/update and does the query and populate the field. but the problem with this approach is if you move the points then the polygon fields are no longer consistent, you will have to go and make a bogus edit to the polygon to activate the attribute rule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assume you have the following schema&lt;/P&gt;&lt;P&gt;polygonClass (fields: hasPoint)&lt;/P&gt;&lt;P&gt;pointClass1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//rough script on the polygon class to the hasPoint field&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPointClass1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"PointClass1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"objectid"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPointClass1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"yes"&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;
   &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"no"&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:23:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323982#M14114</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2021-12-11T15:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323983#M14115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is perfect Hussein.&amp;nbsp; Thank you!&lt;BR /&gt;&lt;BR /&gt;I do sheepishly have to say I did think of another attribute rule application question over the weekend.&amp;nbsp; I'll post that in a separate thread as it's slightly different in scope (I think).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assistance has been extremely helpful.&amp;nbsp; Thank you again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 12:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323983#M14115</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-27T12:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323984#M14116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW Hussein, this is probably a big enough and useful enough topic that you could write a very successful book on the subject.&amp;nbsp; These tools may finally give us the ability to build out Collector apps from the desktop that are on par with ArcPad wrt data validation and conditional attribution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 12:34:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323984#M14116</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-27T12:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323985#M14117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may have spoken too soon.&amp;nbsp; For the polygon-attribute-flipping when it contains a point from another fc, it is the *point* that is being created/updated, not the polygon.&amp;nbsp; So we have sample areas polygons that are existing, and when a sample point is taken it get's the ID from the polygon.&amp;nbsp; We then need to simultaneously trigger the polygon to update its hasPoint field to "Yes" since it now contains a sample point.&amp;nbsp; I hope that makes sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 14:51:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323985#M14117</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-27T14:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323986#M14118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aha this is a little bit tricky. I will attempt to write the basic version of this but there are so many edge cases that this script doesn't solve. (Moving feature, deleting a bunch of features at once) .. But this is just a start.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two classes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;polygonClass&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pointClass&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the pointClass add an attribute rule on insert&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//on insert &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;//check if we are intersecting a polygon. If yes, set the hasPoint field on the polygon to Yes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPolygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectedPolygons &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Intersects &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPolygon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; polygonFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; intersectedPolygons&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// no polygon intersected found , quit..&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//we found a polygon feature set its HasPoint to Yes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="string token"&gt;"result"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
          &lt;SPAN class="string token"&gt;"edit"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"className"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"updates"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                                          &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; polygonFeature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalId&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"attributes"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"hasPoint"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"yes"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                                      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                            &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the pointClass add another attribute rule on Delete&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;//on delete&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;//check if we are intersecting a polygon. If yes, make sure we are the last point, if yes set hasPoint to No!&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPolygon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectedPolygons &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Intersects &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPolygon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; polygonFeature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; intersectedPolygons&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// no polygon intersected found , quit..&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//query the pointClass&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; pointGlobalId &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalid&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsPoint &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"pointClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; intersectedPoints &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Filter&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Intersects &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsPoint&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Geometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonFeature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"globalId &amp;lt;&amp;gt; @pointGlobalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// find all points that are not me in the polygon&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//there are still few points, quit!&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;intersectedPoints&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field

&lt;SPAN class="comment token"&gt;//$feature was the last point, .. set hasPoint to No&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;//we found a polygon feature set its HasPoint to Yes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="string token"&gt;"result"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
          &lt;SPAN class="string token"&gt;"edit"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"className"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"polygonClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"updates"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
                                          &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"globalId"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; polygonFeature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalId&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                 &lt;SPAN class="string token"&gt;"attributes"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"hasPoint"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"no"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                                      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                            &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
                   &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/479493_deleteinsert.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:23:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323986#M14118</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2021-12-11T15:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323987#M14119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very helpful indeed Hussein!&amp;nbsp; Thank you so much.&amp;nbsp; I'm attempting to implement now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 15:53:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323987#M14119</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-27T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323988#M14120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Close, but running into a problem here.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my implementation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var fsBuffer = FeatureSetByName($datastore, "Section3.DBO.PlannedSoilsSamplngLocationBuffers", ["GlobalID"], false);&lt;BR /&gt;var intersectPolys = Intersects(fsBuffer, $feature);&lt;BR /&gt;var fsBufferFeature = null;&lt;BR /&gt;for (fsBufferFeature in intersectPolys) break;&lt;BR /&gt;if (fsBufferFeature == null) return $feature.GlobalID;&lt;/P&gt;&lt;P&gt;//we found a polygon feature set its HasPoint to Yes&lt;BR /&gt;return {&lt;BR /&gt; "result": $feature.GlobalID,&lt;BR /&gt; "edit": [&lt;BR /&gt; {&lt;BR /&gt; "className" : "Section3.DBO.PlannedSoilsSamplingLocationsBuffers",&lt;BR /&gt; "updates": [&lt;BR /&gt; {&lt;BR /&gt; "GlobalID": fsBufferFeature.GlobalID,&lt;BR /&gt; "attributes": {"SampleComplete": "Yes"}&lt;BR /&gt; }&lt;BR /&gt; ]&lt;BR /&gt; }&lt;BR /&gt; ]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is the error I get:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/479513_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I am mis-interpreting your $feature.field syntax. What field in the point feature class should this rule be attached to?&amp;nbsp; It looks like the only field available is SampleID (the one that is auto-calculated from the previous rule).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/479514_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, how do you insert that nice code block into the posts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 17:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323988#M14120</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-27T17:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323989#M14121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attribute rules above Are added to a field on the pointClass called "Field"&amp;nbsp; it is just returning the same value indicating a no-op operation (don't do anything)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case you can just return the sample Id ($feature.sampleid) and assign the attribute rule.. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your rule is complaining about the table that doesn't exist.. make sure that table&amp;nbsp;Section3.DBO.PlannedSoilsSamplngLocationBuffers exists&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 17:38:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323989#M14121</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2020-01-27T17:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323990#M14122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm.&amp;nbsp; yes, it definitely exists.&amp;nbsp; It's the same polygon field that is contributing the SampleID from the previous rule (which works great, BTW.&amp;nbsp; TY!!).&amp;nbsp; I'm very confused as to why it's not finding it.&amp;nbsp; I would think if it didn't exist it would throw an error on line 1 and not validate.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2020 17:45:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323990#M14122</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-27T17:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323991#M14123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it now...&amp;nbsp; human error (of course).&amp;nbsp; Thank you for all your help.&amp;nbsp; This has been extremely instructive.&amp;nbsp; Are there any resources that could help expose more of the capabilities of attribute rules?&amp;nbsp; For example, the update of attributes with the edit.[] block is not something I would have even known was possible from the examples shown in the Pro documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2020 13:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/323991#M14123</guid>
      <dc:creator>AndrewZimba1</dc:creator>
      <dc:date>2020-01-28T13:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/1021560#M36601</link>
      <description>&lt;P&gt;Hi, I am having a similair issue with an attribute rule I am trying to implement. Took Hussein's "Buffer a Point Feature Rule" and&amp;nbsp; changed the polygon classname to my layer on slqserver.&amp;nbsp;&lt;/P&gt;&lt;P&gt;"className" : "[Sandbox1].[coc\rfindlay].[INFRASTRUCTUREPROJECTS]".&lt;/P&gt;&lt;P&gt;it couldn't find the table. I figured the square braces was the right syntax, Catalog refers to the layer as&amp;nbsp;&amp;nbsp;Sandbox1."coc\rfindlay".INFRASTRUCTUREPROJECTS, and the quotes and slashes i think are making trouble for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help welcome. Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/1021560#M36601</guid>
      <dc:creator>RossFindlay</dc:creator>
      <dc:date>2021-01-29T16:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to implement attribute rule example in Pro documentation</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/1021692#M36629</link>
      <description>&lt;P&gt;Just a follow up that I did solve my issue.&lt;/P&gt;&lt;P&gt;I created a variable fsBuffer = "InfrastructureProjects" that I then referenced in the "className" line. This passed the value and the buffer was created.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 19:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/problems-trying-to-implement-attribute-rule/m-p/1021692#M36629</guid>
      <dc:creator>RossFindlay</dc:creator>
      <dc:date>2021-01-29T19:18:48Z</dc:date>
    </item>
  </channel>
</rss>

