<?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 Creating Attribute Rules for Intersecting Features and Preserving M to M Relationship Class in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/creating-attribute-rules-for-intersecting-features/m-p/1339382#M74121</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am new to creating attribute rules and am trying to copy a field from an intersecting feature into a specified layer in my ArcGIS Pro document in a FGDB&lt;/P&gt;&lt;P&gt;Essentially, I have two separate project layers that are polygon layers in the same file geodatabase. Both of them consist of projects from two separate departments.&lt;/P&gt;&lt;P&gt;ProjectsA - Has a project_number field for all existing intersecting project_numbers from ProjectsB&lt;/P&gt;&lt;P&gt;ProjectsB - Has a project_number field&lt;/P&gt;&lt;P&gt;I want to create attribute rule(s) that ensure that any time a new project number is written to ProjectsB, that only the intersecting polygon(s) from ProjectsA are updated with the same project number that was added or updated in ProjectsB.&lt;/P&gt;&lt;P&gt;I have already created an FME script that took all intersecting polygons from ProjectsB and inputted them into a project_number field in ProjectsA. I have a second project_number_display field in the instances whereby projects from ProjectA intersect with multiple projects from ProjectsB and separated each project_number with a semi colon ';', as the initial project_number field could not account for multiple project_numbers from ProjectsB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created an intermediary table for all of the intersecting project_number ProjectA and ProjectB polygons, as well as duplicate records for each instance in which there were multiple project_numbers (i.e. PP2023-12; PP2023-05) for a single project from ProjectA.&lt;/P&gt;&lt;P&gt;I used table to relationship class geoprocessing tool to create a M to M relationship class between the two, so that whenever a user clicks on a polygon from ProjectsA, the related record will show any intersecting polygons from ProjectsB and vice versa. This includes instances where there are multiple intersecting projects from either.&lt;/P&gt;&lt;P&gt;I want to ensure that the relationship class is preserved when an edit/update/delete is made to either ProjectsA or ProjectsB in the future and would hope that the attribute rules would be able to preserve this relationship between intersecting polygons.&lt;/P&gt;&lt;P&gt;This is the current attribute rule I have set up for ProjectsA:&lt;/P&gt;&lt;P&gt;var ProjectsB = Intersects(FeatureSetByName($datastore, 'ProjectsB', ['project_number']), $feature);&lt;BR /&gt;if (Count(ProjectsB) &amp;gt; 0) {&lt;BR /&gt;return First(ProjectsB)['project_number'];&lt;BR /&gt;} else {&lt;BR /&gt;return $feature['project_number'];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;This is where $feature will refer to ProjectsA.&lt;/P&gt;&lt;P&gt;This doesn't seem to update the appropriate project_number field when I create a new test polygon in ProjectsB.&lt;/P&gt;&lt;P&gt;Is there something that is sticking out to anybody here?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 21:54:19 GMT</pubDate>
    <dc:creator>Boomer87</dc:creator>
    <dc:date>2023-10-18T21:54:19Z</dc:date>
    <item>
      <title>Creating Attribute Rules for Intersecting Features and Preserving M to M Relationship Class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/creating-attribute-rules-for-intersecting-features/m-p/1339382#M74121</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am new to creating attribute rules and am trying to copy a field from an intersecting feature into a specified layer in my ArcGIS Pro document in a FGDB&lt;/P&gt;&lt;P&gt;Essentially, I have two separate project layers that are polygon layers in the same file geodatabase. Both of them consist of projects from two separate departments.&lt;/P&gt;&lt;P&gt;ProjectsA - Has a project_number field for all existing intersecting project_numbers from ProjectsB&lt;/P&gt;&lt;P&gt;ProjectsB - Has a project_number field&lt;/P&gt;&lt;P&gt;I want to create attribute rule(s) that ensure that any time a new project number is written to ProjectsB, that only the intersecting polygon(s) from ProjectsA are updated with the same project number that was added or updated in ProjectsB.&lt;/P&gt;&lt;P&gt;I have already created an FME script that took all intersecting polygons from ProjectsB and inputted them into a project_number field in ProjectsA. I have a second project_number_display field in the instances whereby projects from ProjectA intersect with multiple projects from ProjectsB and separated each project_number with a semi colon ';', as the initial project_number field could not account for multiple project_numbers from ProjectsB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then created an intermediary table for all of the intersecting project_number ProjectA and ProjectB polygons, as well as duplicate records for each instance in which there were multiple project_numbers (i.e. PP2023-12; PP2023-05) for a single project from ProjectA.&lt;/P&gt;&lt;P&gt;I used table to relationship class geoprocessing tool to create a M to M relationship class between the two, so that whenever a user clicks on a polygon from ProjectsA, the related record will show any intersecting polygons from ProjectsB and vice versa. This includes instances where there are multiple intersecting projects from either.&lt;/P&gt;&lt;P&gt;I want to ensure that the relationship class is preserved when an edit/update/delete is made to either ProjectsA or ProjectsB in the future and would hope that the attribute rules would be able to preserve this relationship between intersecting polygons.&lt;/P&gt;&lt;P&gt;This is the current attribute rule I have set up for ProjectsA:&lt;/P&gt;&lt;P&gt;var ProjectsB = Intersects(FeatureSetByName($datastore, 'ProjectsB', ['project_number']), $feature);&lt;BR /&gt;if (Count(ProjectsB) &amp;gt; 0) {&lt;BR /&gt;return First(ProjectsB)['project_number'];&lt;BR /&gt;} else {&lt;BR /&gt;return $feature['project_number'];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;This is where $feature will refer to ProjectsA.&lt;/P&gt;&lt;P&gt;This doesn't seem to update the appropriate project_number field when I create a new test polygon in ProjectsB.&lt;/P&gt;&lt;P&gt;Is there something that is sticking out to anybody here?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 21:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/creating-attribute-rules-for-intersecting-features/m-p/1339382#M74121</guid>
      <dc:creator>Boomer87</dc:creator>
      <dc:date>2023-10-18T21:54:19Z</dc:date>
    </item>
  </channel>
</rss>

