<?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 Issue with Attribute Constraint Rules Not Working Properly in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1339920#M1147</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I've come across a puzzling problem with attribute constraint rules in ArcGIS Pro that I could use some help with.&lt;/P&gt;&lt;P&gt;I set up a rule to keep specific point features inside certain polygons, and it works perfectly during inserts. But when I try to move a feature outside its designated polygon during an update, the rule triggers, I get the error message, but the edit still happens.&lt;/P&gt;&lt;P&gt;Has anyone else faced this issue? Any insights would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Stefan&lt;BR /&gt;&lt;BR /&gt;PS: This is the code i am working with:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Create a feature set of intersecting StructureBoundaries
var intersectingBoundaries = Intersects(FeatureSetByName($datastore, 'StructureBoundary'), $feature);

// Initialize a boolean variable to track if the point touches any boundary edge
var touchesEdge = false;

// Loop through intersecting StructureBoundaries
	for (var boundary in intersectingBoundaries) {

		// Check if the point feature touches the edge of the current boundary
		if (Touches($feature, boundary)) {
			// Set parameter to true if edge is not allowed (device and junction (except wall bushing)) for assembly set on false
			touchesEdge = EDGE_PARA;
			break; // Exit loop since we found a touching boundary
		}
	}
        
// Check if feature intersects a boundary
if(touchesEdge){
    return false; 
} else if(count(intersectingBoundaries) &amp;gt; 0) {
    return true; 
} else {
	return false;
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 06:46:26 GMT</pubDate>
    <dc:creator>StefanAngerer</dc:creator>
    <dc:date>2023-10-20T06:46:26Z</dc:date>
    <item>
      <title>Issue with Attribute Constraint Rules Not Working Properly</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1339920#M1147</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I've come across a puzzling problem with attribute constraint rules in ArcGIS Pro that I could use some help with.&lt;/P&gt;&lt;P&gt;I set up a rule to keep specific point features inside certain polygons, and it works perfectly during inserts. But when I try to move a feature outside its designated polygon during an update, the rule triggers, I get the error message, but the edit still happens.&lt;/P&gt;&lt;P&gt;Has anyone else faced this issue? Any insights would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Stefan&lt;BR /&gt;&lt;BR /&gt;PS: This is the code i am working with:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Create a feature set of intersecting StructureBoundaries
var intersectingBoundaries = Intersects(FeatureSetByName($datastore, 'StructureBoundary'), $feature);

// Initialize a boolean variable to track if the point touches any boundary edge
var touchesEdge = false;

// Loop through intersecting StructureBoundaries
	for (var boundary in intersectingBoundaries) {

		// Check if the point feature touches the edge of the current boundary
		if (Touches($feature, boundary)) {
			// Set parameter to true if edge is not allowed (device and junction (except wall bushing)) for assembly set on false
			touchesEdge = EDGE_PARA;
			break; // Exit loop since we found a touching boundary
		}
	}
        
// Check if feature intersects a boundary
if(touchesEdge){
    return false; 
} else if(count(intersectingBoundaries) &amp;gt; 0) {
    return true; 
} else {
	return false;
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 06:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1339920#M1147</guid>
      <dc:creator>StefanAngerer</dc:creator>
      <dc:date>2023-10-20T06:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Attribute Constraint Rules Not Working Properly</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1339948#M1148</link>
      <description>&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;I am unable to reproduce your issue. Using your code I created a polygon feature class called ' StructureBoundary' and&amp;nbsp; point feature class called 'Point'. To the point FC I applied your code as a constraint with insert and update selected for the triggers. The error number as 999 and the Error message as '1234567'&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When creating a point inside the StructureBoundary the rule does not fire and the point feature is created. If I try to create a point feature outside the boundary the rule triggers.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When creating a point inside the StructureBoundary then moving that point inside the StructureBoundary the rule does not fire and the point feature is moved to the new location. If I try to move that point to outside the boundary the rule triggers giving an error when I click the 'Finish' on the move toolbar the rule triggers and the moved geometry indicator returns the feature to its original position.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have attached a recording.&lt;/P&gt;&lt;P&gt;~Jake&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 10:15:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1339948#M1148</guid>
      <dc:creator>Jake_S</dc:creator>
      <dc:date>2023-10-20T10:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Attribute Constraint Rules Not Working Properly</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1340396#M1149</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/454087"&gt;@Jake_S&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thanks for your help! Seems like I stumbled over a "real" Bug here. The funny thing is: In the Diagnostic Monitor it even shows me that the constraint rule is fired when trying to update the geometry outside of a polygon boundary. However the update still happens.&lt;BR /&gt;&lt;BR /&gt;Very strang behaviour. Anyone experienced something simillar in the past?&lt;BR /&gt;&lt;BR /&gt;Greets,&lt;BR /&gt;Stefan&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 07:45:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1340396#M1149</guid>
      <dc:creator>StefanAngerer</dc:creator>
      <dc:date>2023-10-23T07:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Attribute Constraint Rules Not Working Properly</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1340503#M1150</link>
      <description>&lt;P&gt;Maybe this is specified to your spatial reference.&amp;nbsp; Can you share your units/spatial reference so we can test&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/454087"&gt;@Jake_S&lt;/a&gt;&amp;nbsp;repo in your coordinate system?&amp;nbsp; Can you share your repo dataset?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 14:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1340503#M1150</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2023-10-23T14:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Attribute Constraint Rules Not Working Properly</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1343708#M1158</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/188597"&gt;@MikeMillerGIS&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;For the coordinate-system. No problem. It's (PCS) Belge Lambert 1972 (WKID: 31370). Regarding the repo dataset I can't really assist you. I am not allowed to share data related to our customer. But I am thinking about a solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 09:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/issue-with-attribute-constraint-rules-not-working/m-p/1343708#M1158</guid>
      <dc:creator>StefanAngerer</dc:creator>
      <dc:date>2023-10-31T09:29:08Z</dc:date>
    </item>
  </channel>
</rss>

