<?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 Is there a way to trigger an attribute rule on insertion of a related feature? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-a-way-to-trigger-an-attribute-rule-on/m-p/249499#M10996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an attribute rule that updates a field with the newest creation date of related records in a relationship class:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var results = FeatureSetByRelationshipName($feature, "Post_To_Sign", ['*'], false);&lt;BR /&gt;var latest = null;&lt;BR /&gt;for (var r in results) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (latest == null) latest = r;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (latest.creationdate &amp;lt; r.creationdate) latest = r;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return latest.creationdate;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;(I assume there is an Arcade function that would return the record with the max creationdate, like Max, but I didn't feel like figuring out the syntax).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now that attribute rule only updates when I update the "one" side of the 1:M relationship. What I would like to do is trigger that attribute rule when a related feature is created. Is there a way to trigger that? Features seem to be immutable, or else I would just create an attribute rule on the related record to update that field on insert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2020 13:23:13 GMT</pubDate>
    <dc:creator>WillHouston</dc:creator>
    <dc:date>2020-04-02T13:23:13Z</dc:date>
    <item>
      <title>Is there a way to trigger an attribute rule on insertion of a related feature?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-a-way-to-trigger-an-attribute-rule-on/m-p/249499#M10996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an attribute rule that updates a field with the newest creation date of related records in a relationship class:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var results = FeatureSetByRelationshipName($feature, "Post_To_Sign", ['*'], false);&lt;BR /&gt;var latest = null;&lt;BR /&gt;for (var r in results) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (latest == null) latest = r;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (latest.creationdate &amp;lt; r.creationdate) latest = r;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return latest.creationdate;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;(I assume there is an Arcade function that would return the record with the max creationdate, like Max, but I didn't feel like figuring out the syntax).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now that attribute rule only updates when I update the "one" side of the 1:M relationship. What I would like to do is trigger that attribute rule when a related feature is created. Is there a way to trigger that? Features seem to be immutable, or else I would just create an attribute rule on the related record to update that field on insert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 13:23:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-a-way-to-trigger-an-attribute-rule-on/m-p/249499#M10996</guid>
      <dc:creator>WillHouston</dc:creator>
      <dc:date>2020-04-02T13:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to trigger an attribute rule on insertion of a related feature?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-a-way-to-trigger-an-attribute-rule-on/m-p/249500#M10997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/247334"&gt;Will Houston&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A trigger will only fire on the current layer. However, to be able to achieve what you mentioned, you should configure the attribute rule on the related feature or table and insert into the other featureclass. &lt;A href="https://community.esri.com/migrated-users/154383"&gt;Hussein Nasser&lt;/A&gt;&amp;nbsp;has published a blog explaining how to do this:&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/" title="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/"&gt;Advanced Attribute Rules - Editing features on another class with attribute rules&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also recommend reading his other blogs:&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/author/hussein-nasser/" title="https://www.esri.com/arcgis-blog/author/hussein-nasser/"&gt;https://www.esri.com/arcgis-blog/author/hussein-nasser/&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 14:52:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-a-way-to-trigger-an-attribute-rule-on/m-p/249500#M10997</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-04-02T14:52:06Z</dc:date>
    </item>
  </channel>
</rss>

