<?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 Automatically copy data from related table (when updated) to parent feature in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586526#M1682</link>
    <description>&lt;P&gt;General: I have a feature class with a related table. I want a field in the feature class to be updated to include data from the related table when the corresponding field in the related table is updated.&lt;/P&gt;&lt;P&gt;Specifics. I have a feature class of ROW acquisition parcels (&lt;STRONG&gt;ROWAcqParcels&lt;/STRONG&gt;) and a related table (&lt;STRONG&gt;ROWAcqParcelsTable&lt;/STRONG&gt;) that houses all of the relevant acquisition information for the parcels. The key for the relate is the Parcel ID Number (not sure that's relevant). When the ROW agent fills out the &lt;STRONG&gt;TITLE_WORK_RECEIVED&lt;/STRONG&gt; field in the related table, I want that information to be copied to the &lt;STRONG&gt;TITLE_WORK_RECEIVED&lt;/STRONG&gt; field in the feature class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I currently have is shown below. The code verifies as valid when I build the expression but when I attempt to save the rule, I get an error that says there's an unexpected null, Script line:7&lt;/P&gt;&lt;P&gt;I've looked at a number of different posts and forums related to this and I've tried a number of the solutions but I'm not having any luck.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var sourceTable = FeatureSetByName($datastore, "ROWAcqParcelsTable", ["*"], false)

var key = $feature.PIN

var selectFeature = First(Filter(sourceTable, "PIN = "))

var titleFeature = selectFeature.TITLE_WORK_RECEIVED

if (!IsEmpty(titleFeature)){
    return "Yes"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 19:38:05 GMT</pubDate>
    <dc:creator>MelissaGearman</dc:creator>
    <dc:date>2025-02-18T19:38:05Z</dc:date>
    <item>
      <title>Automatically copy data from related table (when updated) to parent feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586526#M1682</link>
      <description>&lt;P&gt;General: I have a feature class with a related table. I want a field in the feature class to be updated to include data from the related table when the corresponding field in the related table is updated.&lt;/P&gt;&lt;P&gt;Specifics. I have a feature class of ROW acquisition parcels (&lt;STRONG&gt;ROWAcqParcels&lt;/STRONG&gt;) and a related table (&lt;STRONG&gt;ROWAcqParcelsTable&lt;/STRONG&gt;) that houses all of the relevant acquisition information for the parcels. The key for the relate is the Parcel ID Number (not sure that's relevant). When the ROW agent fills out the &lt;STRONG&gt;TITLE_WORK_RECEIVED&lt;/STRONG&gt; field in the related table, I want that information to be copied to the &lt;STRONG&gt;TITLE_WORK_RECEIVED&lt;/STRONG&gt; field in the feature class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I currently have is shown below. The code verifies as valid when I build the expression but when I attempt to save the rule, I get an error that says there's an unexpected null, Script line:7&lt;/P&gt;&lt;P&gt;I've looked at a number of different posts and forums related to this and I've tried a number of the solutions but I'm not having any luck.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var sourceTable = FeatureSetByName($datastore, "ROWAcqParcelsTable", ["*"], false)

var key = $feature.PIN

var selectFeature = First(Filter(sourceTable, "PIN = "))

var titleFeature = selectFeature.TITLE_WORK_RECEIVED

if (!IsEmpty(titleFeature)){
    return "Yes"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 19:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586526#M1682</guid>
      <dc:creator>MelissaGearman</dc:creator>
      <dc:date>2025-02-18T19:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically copy data from related table (when updated) to parent feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586609#M1683</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/435835"&gt;@MelissaGearman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;A couple of things.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;Your code isn't set to update a record from another feature class/table rather it is set to pull and update the record from the related table. Meaning that the record itself would have to be edited in order for it to populate.&lt;/LI&gt;&lt;LI&gt;If you are looking to simply pull and update a record from a related table, here is the modified code below.&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="javascript"&gt;var sourceTable = FeatureSetByName($datastore, "ROWAcqParcelsTable", ["*"], false)
var key = $feature.PIN
var selectFeature = First( Filter( sourceTable , "PIN = @key") )
iif( !IsEmpty( selectFeature ) &amp;amp;&amp;amp; selectFeature.PIN == key , "YES" , "NO" )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Feb 2025 20:01:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586609#M1683</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2025-02-18T20:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically copy data from related table (when updated) to parent feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586893#M1684</link>
      <description>&lt;P&gt;You could try the Update Related AR template found in here -&amp;nbsp;&lt;A href="https://github.com/Esri/arcade-expressions/tree/master/attribute-rules/attribute_assistant/" target="_blank"&gt;https://github.com/Esri/arcade-expressions/tree/master/attribute-rules/attribute_assistant&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://esri.github.io/arcade-expressions/docs/3.3/UpdateRelated.html" target="_blank"&gt;https://esri.github.io/arcade-expressions/docs/3.3/UpdateRelated.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This will be a core Templated Attribute Rule in 3.5&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 13:30:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586893#M1684</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2025-02-19T13:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically copy data from related table (when updated) to parent feature</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586954#M1685</link>
      <description>&lt;P&gt;Thank you for the help! I was actually able to find something that worked at the end of the day yesterday. I followed what was done in this post:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/related-table-changing-attributes-of-a-layer/m-p/1354839" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/related-table-changing-attributes-of-a-layer/m-p/1354839&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 14:49:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/automatically-copy-data-from-related-table-when/m-p/1586954#M1685</guid>
      <dc:creator>MelissaGearman</dc:creator>
      <dc:date>2025-02-19T14:49:22Z</dc:date>
    </item>
  </channel>
</rss>

