<?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: Automatically populating an attribute when a new polygon is created in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555860#M89839</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/289040"&gt;@GregEscott&lt;/a&gt;&amp;nbsp;- if it helps, here is some additional info about using a database sequence with attribute rules.&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p/976527" target="_blank"&gt;https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p/976527&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2024 15:52:16 GMT</pubDate>
    <dc:creator>ToddW_stl</dc:creator>
    <dc:date>2024-11-06T15:52:16Z</dc:date>
    <item>
      <title>Automatically populating an attribute when a new polygon is created</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555301#M89781</link>
      <description>&lt;P&gt;In ArcPro, is it possible to automatically add or edit an attribute in an existing field when a new polygon is created?&lt;/P&gt;&lt;P&gt;Example: A polygon is split in 2. &amp;nbsp;One of the two polygons will have the field "Number" updated. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Original polygon was "Number" '1'&lt;BR /&gt;New polygon from the split will then become "Number" '2'&lt;/P&gt;&lt;P&gt;This would only work if it added a number which is +1 of the highest number in that field of all polygons.&lt;/P&gt;&lt;P&gt;Example: "Number" '1234' is the highest number in the "Number" field.&lt;BR /&gt;&lt;BR /&gt;Original polygon being split is "Number" '1'&lt;BR /&gt;New polygon from the split will have "Number" '1235'&lt;BR /&gt;&lt;BR /&gt;I can't find any information about whether or not this is even possible.&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 02:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555301#M89781</guid>
      <dc:creator>GregEscott</dc:creator>
      <dc:date>2024-11-05T02:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populating an attribute when a new polygon is created</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555311#M89783</link>
      <description>&lt;P&gt;Look into &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm" target="_self"&gt;attribute rules&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 03:13:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555311#M89783</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2024-11-05T03:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populating an attribute when a new polygon is created</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555500#M89798</link>
      <description>&lt;P&gt;That's a great resource, thanks!&lt;BR /&gt;&lt;BR /&gt;I got as far as trying to create a calculation attribute rule, using Arcade to build an expression.&lt;BR /&gt;&lt;BR /&gt;I must be way off.&amp;nbsp; It shows an error in the attribute rules table (red icon next to the rule).&amp;nbsp; The expression is valid, but it's not working.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;// Define the field name&lt;BR /&gt;var field_name = "POLY_NUM";&lt;/P&gt;&lt;P&gt;// Get the maximum value in the field&lt;BR /&gt;var max_value = Max(FeatureSetByName($datastore, "R11_GE", [field_name]), field_name);&lt;/P&gt;&lt;P&gt;// Add 1 to the maximum value&lt;BR /&gt;if (IsEmpty(max_value)) {&lt;BR /&gt;return null; // or return 1 if you want to set 1 as the minimum&lt;BR /&gt;} else {&lt;BR /&gt;return max_value + 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;******&lt;/P&gt;&lt;P&gt;I had the trigger set to insert.&amp;nbsp; I guess update might work too, but maybe that updates the number if you're just changing a boundary, which wouldn't work out well.&lt;/P&gt;&lt;P&gt;Seems like this is much more complex than I had imagined.&amp;nbsp; I really appreciate you pointing me in the right direction.&amp;nbsp; It was useful to read about, even if it didn't work out.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 17:05:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555500#M89798</guid>
      <dc:creator>GregEscott</dc:creator>
      <dc:date>2024-11-05T17:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populating an attribute when a new polygon is created</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555680#M89813</link>
      <description>&lt;P&gt;If anyone stumbles on this and is looking for something that might work, here is what worked for me.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Assign global IDs to your shape file: (data management tools) to get a unique ID for every polygon and each new polygon.&lt;/LI&gt;&lt;LI&gt;Data design - Attribute rules (right click shape file in table of contents)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here you can create a calculation rule using the Arcade language&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Code:&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;// Define the field name&lt;/P&gt;&lt;P&gt;var field_name = "POLY_NUM";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Get the maximum value in the field&lt;/P&gt;&lt;P&gt;var max_value = Max(FeatureSetByName($datastore, "R11_GE", [field_name]), field_name);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add 1 to the maximum value&lt;/P&gt;&lt;P&gt;return max_value + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*****end*****&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;POLY_NUM is my polygon number field. &amp;nbsp;&lt;/P&gt;&lt;P&gt;R11_GE is my polygon shape file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An improvement to this code would be to find any "unused" numbers before the MAX number. &amp;nbsp;Ie: numbers 7-9 out of 1-99 are not populated. &amp;nbsp;Finding a way to select for number 7, because it is not yet used, may be better than using number 100, which would be the MAX+1&lt;BR /&gt;&lt;BR /&gt;That is out of my grasp and I'll have to settle for the MAX number. &amp;nbsp;Perhaps this helps someone with a similar problem. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 01:29:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555680#M89813</guid>
      <dc:creator>GregEscott</dc:creator>
      <dc:date>2024-11-06T01:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populating an attribute when a new polygon is created</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555860#M89839</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/289040"&gt;@GregEscott&lt;/a&gt;&amp;nbsp;- if it helps, here is some additional info about using a database sequence with attribute rules.&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p/976527" target="_blank"&gt;https://community.esri.com/t5/attribute-rules-videos/generating-unique-ids-with-attribute-rules/td-p/976527&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 15:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/automatically-populating-an-attribute-when-a-new/m-p/1555860#M89839</guid>
      <dc:creator>ToddW_stl</dc:creator>
      <dc:date>2024-11-06T15:52:16Z</dc:date>
    </item>
  </channel>
</rss>

