<?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: Copy values automatically between two feature classes in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106898#M7396</link>
    <description>&lt;P&gt;Thanks for your reply and sharing documentation on the same, Ed! Yes, basically, I want to copy values from X to Y based on common ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;FC X = Polygon (project development)&lt;/P&gt;&lt;P&gt;FC Y = Line (sewer upgrades)&lt;/P&gt;&lt;P&gt;After reading few technical blogs - &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/attribute-rules-and-group-templates/" target="_blank" rel="noopener"&gt;(https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/attribute-rules-and-group-templates/&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/" target="_blank" rel="noopener"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/&lt;/A&gt;) , with my limited knowledge of Arccade expression language I build following logic but running into issue with line 12.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajChavada_0-1634090438356.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/25056i1B49A3A7306503E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajChavada_0-1634090438356.png" alt="RajChavada_0-1634090438356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the expression that I came with so far for FC Y to copy values for TECH_REV from FC X based on common ID - DBNUMBER. After user draws lines for sewer upgrades and populate the DBNUMBER, I want this rule to fire up and get the value for TECH_REV from FC X.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//s1 - get features from projects developments feature class
var origin = FeatureSetByName($datastore, "Project_Developments", ["DBNUMBER","TECH_REV"], false);

//s2 - get common ID from newly added feature
var dbnumber = $feature.DBNUMBER;

// s3 - filter feature based on common ID
var match = Filter(origin, "DBNUMBER = @dbnumber");
var matchfeature = first(match);

// s4 - update TECH_REV field in sewer upgrades
return matchfeature.TECH_REV;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2021 02:04:27 GMT</pubDate>
    <dc:creator>Raj-Chavada</dc:creator>
    <dc:date>2021-10-13T02:04:27Z</dc:date>
    <item>
      <title>Copy values automatically between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106797#M7392</link>
      <description>&lt;P&gt;We have two feature classes in enterprise geodatabase (SQL Server). Let’s say - feature class (FC) X. FC Y. They are participating in a relationship class (1 – m). FC X is origin and FC Y is destination.&lt;/P&gt;&lt;P&gt;We are using ArcGIS Pro 2.7.&lt;/P&gt;&lt;P&gt;There is requirement to auto populate some common fields between FC X and FC Y one it is populated in FC X (origin). Is this possible to set it up using out of box solution (e.g. attribute rule – custom arcade expression calculating/copying values from FC X to FC Y based on the relationship class)&lt;/P&gt;&lt;P&gt;Any feedback related to developing a technical solution closely relating to this requirement will be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 02:13:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106797#M7392</guid>
      <dc:creator>Raj-Chavada</dc:creator>
      <dc:date>2021-10-13T02:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copy values automatically between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106876#M7395</link>
      <description>&lt;P&gt;Hello Raj&amp;nbsp;&lt;/P&gt;&lt;P&gt;An attribute rule should do the trick (specifically, an immediate calculation) with Arcade expression&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/calculation-attribute-rules.htm" target="_blank"&gt;Calculation attribute rules—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What exactly do you want to copy across into FCY ( for example, it is just to copy text A, concatenate A and B or do a numerical calculation between A+B) and is there any spatial operations that would trigger this event? For example, I draw a new point (an asset) within a polygon ( a park), update Address of asset based on Park Address field? This influences the arcade expression and configuration of the attribute rule.&lt;/P&gt;&lt;P&gt;Here are some examples -&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm" target="_blank"&gt;Attribute rule script expression examples—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a look at the examples "Mark another feature as requiring evaluation" and "Edit another feature class"&lt;/P&gt;&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers Ed&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 22:15:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106876#M7395</guid>
      <dc:creator>Eduardo_Fernandez_EsriAu</dc:creator>
      <dc:date>2021-10-12T22:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Copy values automatically between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106898#M7396</link>
      <description>&lt;P&gt;Thanks for your reply and sharing documentation on the same, Ed! Yes, basically, I want to copy values from X to Y based on common ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;FC X = Polygon (project development)&lt;/P&gt;&lt;P&gt;FC Y = Line (sewer upgrades)&lt;/P&gt;&lt;P&gt;After reading few technical blogs - &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/attribute-rules-and-group-templates/" target="_blank" rel="noopener"&gt;(https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/attribute-rules-and-group-templates/&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/" target="_blank" rel="noopener"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/advanced-gdb-attribute-rules-editing-external-features-with-attribute-rules/&lt;/A&gt;) , with my limited knowledge of Arccade expression language I build following logic but running into issue with line 12.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RajChavada_0-1634090438356.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/25056i1B49A3A7306503E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RajChavada_0-1634090438356.png" alt="RajChavada_0-1634090438356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the expression that I came with so far for FC Y to copy values for TECH_REV from FC X based on common ID - DBNUMBER. After user draws lines for sewer upgrades and populate the DBNUMBER, I want this rule to fire up and get the value for TECH_REV from FC X.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//s1 - get features from projects developments feature class
var origin = FeatureSetByName($datastore, "Project_Developments", ["DBNUMBER","TECH_REV"], false);

//s2 - get common ID from newly added feature
var dbnumber = $feature.DBNUMBER;

// s3 - filter feature based on common ID
var match = Filter(origin, "DBNUMBER = @dbnumber");
var matchfeature = first(match);

// s4 - update TECH_REV field in sewer upgrades
return matchfeature.TECH_REV;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 02:04:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106898#M7396</guid>
      <dc:creator>Raj-Chavada</dc:creator>
      <dc:date>2021-10-13T02:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Copy values automatically between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106952#M7398</link>
      <description>&lt;P&gt;Seems like you don't find any matches in line 8. When you call First() on an empty featureset, the result will be null (line9).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(matchfeature != null) {
  return matchfeature.TECH_REV
}
return null&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:12:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1106952#M7398</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-10-13T07:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Copy values automatically between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1107253#M7399</link>
      <description>&lt;P&gt;Here is the complete and working script :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//s1 - get features from projects developments feature class
var origin = FeatureSetByName($datastore, "PROJECT_DEVELOPMENTS", ["DBNUMBER","TECH_REV", "CONS_Q", "CONS_YR", "CONS_DUR"], false);

//s2 - get common ID from newly added feature
var dbnumber = $feature.DBNUMBER;

// s3 - filter feature based on common ID
var match = Filter(origin, "DBNUMBER = @dbnumber");
var matchfeature = first(match);

// s4 - update TECH_REV, EST_OCC_QTR, EST_OCC_YR, EST_CON_DUR field in sewer upgrades
if (matchfeature != null) {
return {
    "result" : {
        "attributes" : {
              "EST_OCC_QTR" : matchfeature.CONS_Q,
              "EST_OCC_YR"  : matchfeature.CONS_YR,
              "EST_CON_DUR" : matchfeature.CONS_DUR,
              "TECH_REV"    : matchfeature.TECH_REV
       }
}
}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 18:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/copy-values-automatically-between-two-feature/m-p/1107253#M7399</guid>
      <dc:creator>Raj-Chavada</dc:creator>
      <dc:date>2021-10-13T18:57:39Z</dc:date>
    </item>
  </channel>
</rss>

