<?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 Help Creating Attribute Rules That Allow Attributes to Flow Between Feature Class and Related Table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/help-creating-attribute-rules-that-allow/m-p/1404051#M81225</link>
    <description>&lt;P&gt;Hello.&amp;nbsp; I have come across a handful of posts aiming to accomplish very similar objectives.&amp;nbsp; However, the examples I've seen have all had nuances making the coding a bit too complex for me to simplify for my basic needs.&amp;nbsp; All I would like to do is transfer an attribute from a feature class field to a related table field and vice-versa.&amp;nbsp; My relationship classes are all GlobalID to GUID.&amp;nbsp; For a related table, I'd want the desired field to be populated upon record creation and updated when the corresponding parent feature class field is edited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have come close thru modifying an example code I found (although I don't understand all of it) but the related table field only populates upon record creation.&amp;nbsp; It is not updating when the parent feature class field is updated despite the 'update' trigger being used.&amp;nbsp; I'll include the code below but am certainly open to something completely different.&amp;nbsp; I just want a basic way to do this!&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/514137"&gt;@Terry_Bearb&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;I have reviewed many of your posts and ideas regarding this.&amp;nbsp; If either of you are able to provide advice, that would be awesome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Pass attribute from Feature Class (field name is FID) to Related Table (field name is FID)
//Field: FID
//Triggers: Insert, Update
//Execution: Exclude from Application Evaluation (have also attempted without this being checked on)

var Features = FeatureSetByName($datastore, 'OCGIS.OCGIS.DPW_TESTING');
var globalid = $feature.GUID
var filterStatement = 'GlobalID = @globalid'
var Related_Table = Filter(Features, filterStatement)
var cnt = Count(Related_Table);

var results = "";

if (cnt &amp;gt; 0) {
for (var row in Related_Table) {
var line = row.FID;
results +=line;
}
} else {
results = "No related record";
}
return results;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 20:40:23 GMT</pubDate>
    <dc:creator>ChristopherBowering</dc:creator>
    <dc:date>2024-04-01T20:40:23Z</dc:date>
    <item>
      <title>Help Creating Attribute Rules That Allow Attributes to Flow Between Feature Class and Related Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-creating-attribute-rules-that-allow/m-p/1404051#M81225</link>
      <description>&lt;P&gt;Hello.&amp;nbsp; I have come across a handful of posts aiming to accomplish very similar objectives.&amp;nbsp; However, the examples I've seen have all had nuances making the coding a bit too complex for me to simplify for my basic needs.&amp;nbsp; All I would like to do is transfer an attribute from a feature class field to a related table field and vice-versa.&amp;nbsp; My relationship classes are all GlobalID to GUID.&amp;nbsp; For a related table, I'd want the desired field to be populated upon record creation and updated when the corresponding parent feature class field is edited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have come close thru modifying an example code I found (although I don't understand all of it) but the related table field only populates upon record creation.&amp;nbsp; It is not updating when the parent feature class field is updated despite the 'update' trigger being used.&amp;nbsp; I'll include the code below but am certainly open to something completely different.&amp;nbsp; I just want a basic way to do this!&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/514137"&gt;@Terry_Bearb&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;I have reviewed many of your posts and ideas regarding this.&amp;nbsp; If either of you are able to provide advice, that would be awesome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Pass attribute from Feature Class (field name is FID) to Related Table (field name is FID)
//Field: FID
//Triggers: Insert, Update
//Execution: Exclude from Application Evaluation (have also attempted without this being checked on)

var Features = FeatureSetByName($datastore, 'OCGIS.OCGIS.DPW_TESTING');
var globalid = $feature.GUID
var filterStatement = 'GlobalID = @globalid'
var Related_Table = Filter(Features, filterStatement)
var cnt = Count(Related_Table);

var results = "";

if (cnt &amp;gt; 0) {
for (var row in Related_Table) {
var line = row.FID;
results +=line;
}
} else {
results = "No related record";
}
return results;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 20:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-creating-attribute-rules-that-allow/m-p/1404051#M81225</guid>
      <dc:creator>ChristopherBowering</dc:creator>
      <dc:date>2024-04-01T20:40:23Z</dc:date>
    </item>
  </channel>
</rss>

