<?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: Arcade - Update Feature Class based on related table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662675#M29360</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/147812"&gt;Kieren Tinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A couple of things to start with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If the data is related through a relationshipclass, use the "FeatureSetByRelationshipName" to access any related data.&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp;that is not the case, keep in mind that a valid sql expression to filter the data on global id requires son additional formatting. Example:&amp;nbsp;&lt;SPAN style="font-family: terminal, monaco, monospace; color: #000080;"&gt;var sql = "parentglobalid = '{" + Upper(code) + "}'";&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;However, I think it should be possible to use:&amp;nbsp;&lt;SPAN style="color: #000080; font-family: 'andale mono', monospace;"&gt;var premiseSQL = "GlobalID = @locationeguidKey";&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I would take out the if statement that is within the return statement and place it before the return&lt;/LI&gt;&lt;LI&gt;In the for loop you are accessing a variable called "&lt;SPAN style="color: #ff0000;"&gt;non&lt;/SPAN&gt;CustomerAddressResult". I suppose that should be "CustomerAddressResult"&lt;/LI&gt;&lt;LI&gt;In the for loop you overwrite for each address the value you assign to variable txt. If you just need a single&amp;nbsp;adress,just use the First (and check if you have any results).&lt;/LI&gt;&lt;LI&gt;Try the expression for instance in a pop-up and return the txt variable to see if it gives any results. If you have the correct value assigned to the variable txt we will see the next step to write the value to the output.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2020 22:29:31 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2020-07-23T22:29:31Z</dc:date>
    <item>
      <title>Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662674#M29359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement an attribute rule which updates a feature class field when the related 1:M table gets updated.&amp;nbsp; The process right now is, the field in the related table changes, we get the keys, roll up the data into a string and then get the related record in the feature class and write the text value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is, a) the for loop is in error and if I comment it our and put a dummy value in my text variable, it doesn't actually write anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.- thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tbl = FeatureSetByName($datastore,"DB.LAND.CustomerAddress");&lt;BR /&gt;var fc = FeatureSetByName($datastore,"DB.LAND.AddressLocation");&lt;BR /&gt;var locationeguidKey = $feature["locationeguid"];&lt;BR /&gt;var CustomerSql = "locationeguidKey = '" + locationeguidKey + "'";&lt;BR /&gt;var premiseSQL = "GlobalID = '" + locationeguidKey + "'";&lt;BR /&gt;var CustomerAddressResult = Filter(tbl, CustomerSql);&lt;BR /&gt;var txt = null;&lt;/P&gt;&lt;P&gt;var address;&lt;/P&gt;&lt;P&gt;for (var address in nonCustomerAddressResult){&lt;BR /&gt; txt = Text(address.building_number, ',');&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return {&lt;/P&gt;&lt;P&gt;if (Count(txt) &amp;gt; 0){&lt;BR /&gt; txt = Left(txt, Count(txt) - 1);&lt;BR /&gt; premiseResult = Filter(fc, premiseSQL)&lt;BR /&gt;// premiseKey.labeltext = txt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;"result" : txt,&lt;/P&gt;&lt;P&gt;"edit":[{&lt;BR /&gt; "className": "premiseResult",&lt;BR /&gt; "updates" : [{&lt;BR /&gt; "labeltext": txt&lt;BR /&gt; }]&lt;BR /&gt; }]&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 20:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662674#M29359</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-23T20:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662675#M29360</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/147812"&gt;Kieren Tinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A couple of things to start with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If the data is related through a relationshipclass, use the "FeatureSetByRelationshipName" to access any related data.&lt;/LI&gt;&lt;LI&gt;If&amp;nbsp;that is not the case, keep in mind that a valid sql expression to filter the data on global id requires son additional formatting. Example:&amp;nbsp;&lt;SPAN style="font-family: terminal, monaco, monospace; color: #000080;"&gt;var sql = "parentglobalid = '{" + Upper(code) + "}'";&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;However, I think it should be possible to use:&amp;nbsp;&lt;SPAN style="color: #000080; font-family: 'andale mono', monospace;"&gt;var premiseSQL = "GlobalID = @locationeguidKey";&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;I would take out the if statement that is within the return statement and place it before the return&lt;/LI&gt;&lt;LI&gt;In the for loop you are accessing a variable called "&lt;SPAN style="color: #ff0000;"&gt;non&lt;/SPAN&gt;CustomerAddressResult". I suppose that should be "CustomerAddressResult"&lt;/LI&gt;&lt;LI&gt;In the for loop you overwrite for each address the value you assign to variable txt. If you just need a single&amp;nbsp;adress,just use the First (and check if you have any results).&lt;/LI&gt;&lt;LI&gt;Try the expression for instance in a pop-up and return the txt variable to see if it gives any results. If you have the correct value assigned to the variable txt we will see the next step to write the value to the output.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 22:29:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662675#M29360</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-07-23T22:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662676#M29361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander,&amp;nbsp; Thank you ,I hadn't even noticed the logic error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've updated the code here - for the popup - would I still use $map in the attribute rule? I wouldn't think so, but I could be wrong.&amp;nbsp; Also, the $feature here is referencing the point I clicked, however in the attribute rule it's actually reversed as it would be from the table to the feature?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the SQL, I am using it as I need to roll up all of the values from the table and then write them to the the feature in a comma separated list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tbl = FeatureSetByName($map,"Non Customer Address");&lt;BR /&gt;var fc = FeatureSetByName($map,"Premise");&lt;BR /&gt;var premiseKey = $feature["GlobalID"];&lt;BR /&gt;var nonCustomerSql = "premiseguid = '" + premiseKey + "'";&lt;BR /&gt;var premiseSQL = "GlobalID = '" + premiseKey + "'";&lt;BR /&gt;var nonCustomerAddressResult = Filter(tbl, nonCustomerSql);&lt;BR /&gt;var txt = null;&lt;BR /&gt;var premiseResult = Filter(fc, premiseSQL);&lt;/P&gt;&lt;P&gt;for (var address in nonCustomerAddressResult){&lt;BR /&gt; txt = txt + Text(address.building_number, ',');&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;If (count(txt) &amp;gt; 0){&lt;BR /&gt; premiseResult = Filter(fc, premiseSQL);&lt;BR /&gt; premiseKey.labeltext = txt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt; &lt;BR /&gt; "result": txt,&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 23:30:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662676#M29361</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-23T23:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662677#M29362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;‌, thank you.&amp;nbsp; I am much further ahead, the only part the script appears to be failing on now is an "failed edit operation, Required keyword not defined in script".&amp;nbsp; I wonder if it is the 'labeltext' element, which is actually a field that the result needs to be written to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tbl = FeatureSetByName($datastore,"DB.LAND.NonCustomerAddress");&lt;BR /&gt;var fc = FeatureSetByName($datastore,"DB.LAND.Premise");&lt;BR /&gt;var premiseKey = $feature["GlobalID"];&lt;BR /&gt;var nonCustomerSql = "GlobalID = '" + premiseKey + "'";&lt;BR /&gt;var nonCustomerAddressResult = Filter(tbl, nonCustomerSql);&lt;/P&gt;&lt;P&gt;var txt = null;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for (var address in nonCustomerAddressResult){&lt;BR /&gt; txt = txt + address.building_number + ',';&lt;BR /&gt; premiseKey = address.premiseguid;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var premiseSQL = "GlobalID = '" + premiseKey + "'";&lt;BR /&gt;var premiseResult = Filter(fc, premiseSQL);&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt; &lt;BR /&gt; "result" : txt,&lt;/P&gt;&lt;P&gt;"edit" : [{&lt;BR /&gt; "className" : "DB.LAND.Premise",&lt;BR /&gt; "updates" : [{&lt;BR /&gt; "labeltext" : txt&lt;BR /&gt; }]&lt;BR /&gt; &lt;BR /&gt; }]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 00:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662677#M29362</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-24T00:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662678#M29363</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/147812" target="_blank"&gt;Kieren Tinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Would I still use $map in the attribute rule?&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;No, $map is not available&amp;nbsp;for attribute rules. They are executed at the database level and at that level there is no knowledge about any map. I also recommend using the $datastore in the pop-up to be closer to the actual situation you want to solve.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Also, the $feature here is referencing the point I clicked, however in the attribute rule it's actually reversed as it would be from the table to the feature?&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That changes things a bit.&amp;nbsp;You will have to use a default value for the table record to simulate the process. Instead of using&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; locationeguidKey &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"locationeguid"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;You should assign an existing "loctioneguid"&amp;nbsp; value from your table to ensure that you can simulate the process.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;As for the SQL, I am using it as I need to roll up all of the values from the table and then write them to the the feature in a comma separated list.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;The SQL will not work&amp;nbsp;the way you configured it.&amp;nbsp;Verify if you can use&amp;nbsp;FeatureSetByRelationshipName function and if not, change the sql using the example I provided before. Either use this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; nonCustomerSql &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"premiseguid = @premiseKey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; premiseSQL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"GlobalID = @premiseKey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;... or:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; nonCustomerSql &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"premiseguid = '{"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Upper&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;premiseKey&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"}'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; premiseSQL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"GlobalID = '{"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Upper&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;premiseKey&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"}'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following line will not work:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txt &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Text&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;address&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;building_number&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If the building number is numeric then you will have to use the Text function to convert it to text (applying any formatting you want) and concatenate it with the comma.&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txt &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Text&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;address&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;building_number&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The line:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;premiseKey&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;labeltext &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txt&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;... will result in an error, since premiseKey is a GlobalID and does not have a property "labeltext".&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:01:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662678#M29363</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T04:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662679#M29364</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/people/KierenTinning" target="_blank"&gt;KierenTinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing in the pop-up I would probably first use something like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; tbl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DB.LAND.NonCustomerAddress"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DB.LAND.Premise"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; premiseKey &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GlobalID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// replace with an existing GlobalID from the table&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; nonCustomerSql &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"GlobalID = @premiseKey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nonCustomerSql&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; nonCustomerAddressResult &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Filter&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tbl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; nonCustomerSql&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Count:"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nonCustomerAddressResult&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;nonCustomerAddressResult&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; address &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; nonCustomerAddressResult&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; txt &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; address&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;building_number &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;','&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;//premiseKey = address.premiseguid;&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" - building_number:"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; address&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;building_number&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" - txt:"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; txt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;Console&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" - premiseguid:"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; address&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;premiseguid&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; txt&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;... and check the messages that are written to the console.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662679#M29364</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T04:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662680#M29365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;‌ thank you very much for all the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the update from our conversation.&amp;nbsp; I feel like I am soo close - Pro, during the edit, is complaining that a required keyword is missing, but near as I can tell I have them in there, I added the "attribute" from what I saw on a different blog post, but that doesn't appear to be it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tbl = FeatureSetByName($datastore,"GISLND.LAND.NonCustomerAddress");&lt;BR /&gt;var fc = FeatureSetByName($datastore,"GISLND.LAND.Premise");&lt;BR /&gt;var premiseKey = $feature["GlobalID"];&lt;BR /&gt;var nonCustomerSql = "GlobalID = @premiseKey";&lt;BR /&gt;var nonCustomerAddressPremise = Filter(tbl, nonCustomerSql);&lt;/P&gt;&lt;P&gt;for (var address in nonCustomerAddressPremise){&lt;BR /&gt; premiseKey = address.premiseguid;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var nonCustomerSql = "premiseguid = @premiseKey";&lt;BR /&gt;var nonCustomerAddress = Filter(tbl, nonCustomerSql);&lt;BR /&gt;var txt = "";&lt;/P&gt;&lt;P&gt;for (var address in nonCustomerAddress){&lt;BR /&gt; txt = txt + address.building_number + ',';&lt;BR /&gt; premiseKey = address.premiseguid;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var premiseSQL = "GlobalID = @premiseKey";&lt;BR /&gt;var premiseResult = Filter(fc, premiseSQL);&lt;/P&gt;&lt;P&gt;return {&lt;BR /&gt; &lt;BR /&gt; "result": txt,&lt;/P&gt;&lt;P&gt;"edit":[{&lt;BR /&gt; "className": "Premise",&lt;BR /&gt; "updates" : [{&lt;BR /&gt;"attributes": [{&lt;BR /&gt;"labeltext": txt&lt;BR /&gt; }]&lt;BR /&gt; &lt;BR /&gt; }]&lt;BR /&gt; &lt;BR /&gt; }]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 01:30:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662680#M29365</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-24T01:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662681#M29366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help, I have it working now. I had missed the "GlobalID" for the update edit method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 03:17:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662681#M29366</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-24T03:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662682#M29367</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/147812" target="_blank"&gt;Kieren Tinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to hear that it is working now. If you included the GlobalID in the return object you are probably updating a single feature. In the help there is an example that shows how to update multiple&amp;nbsp;features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See:&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/attribute-rule-script-expression.htm" title="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/attribute-rule-script-expression.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Attribute rule script expression examples—Geodatabases | Documentation&lt;/A&gt;&amp;nbsp; (Edit another featureclass). There you will see this example:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsAddress &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$datastore&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Address_pnts"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"globalid"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fsListAddpnts &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsAddress&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; AddList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; counter &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; noAddress &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fsListAddpnts&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;noAddress &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; address &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fsListAddpnts&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        AddList&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;counter&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="string token"&gt;'globalid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; address&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;globalid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            &lt;SPAN class="string token"&gt;'attributes'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="string token"&gt;'add_district_name'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DistrictName
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        counter&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;'result'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; noAddress &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' addresses found in the district.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;'edit'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="string token"&gt;'className'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Address_pnts'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            &lt;SPAN class="string token"&gt;'updates'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; AddList
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'No address points in district.'&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key&amp;nbsp;in this example is the AddList, which contains a array of objects that need to be updated. Each element in the array is an object with a globalid property filled with the globalid of the feature in the other featureclass that needs to be updated and an attributes property that contains another object where each attribute name is assigned a value (in this case there is only a single attribute called "add_district_name" that contains the name of the district of the intersecting feature).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post your final expression so that other can see how you solved it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:01:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662682#M29367</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T04:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662683#M29368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I saw that one with the adds - do you know if deleting a record in the related table considered an "Update".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's my next modification - if I add a row in the related table, then update the address value the system triggers properly and updates the Feature Class with the rolled up items.&amp;nbsp; When I delete a record, it doesn't trigger the script to roll up the values to update the feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, so far so good.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 13:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662683#M29368</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-24T13:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662684#M29369</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/people/KierenTinning"&gt;KierenTinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not seen the possibility to delete records using an attribute rule. Can you elaborate a bit more on what your workflow looks like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use a delete action as trigger for an attribute rule to run. You may also want to explore the deletion semantics, since this looks like a cascading delete that you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 14:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662684#M29369</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-07-24T14:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662685#M29370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;‌ what needs to happen is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Premise has label field - records to label from come from related customer table (1:M relationship class).&amp;nbsp; As the label profile for Arcade doesn't support relationship classes, we roll up the address information from the customer table and write the building numbers to a string which is then written to the label field on the feature class.&amp;nbsp; A complicated label script then runs and voila, all is well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we add a related record and then add a building number, the rule runs and rolls everything up.&amp;nbsp; If we modify the customer record then the script runs and updates the label field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem, if I remove a related record from the customer table the script crashes on a keyword error.&amp;nbsp; If I delete a related record in the customer table the script doesn't run, thereby leaving the label field in an incorrect state.&amp;nbsp; If I update an address it's fine.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key is deleting a customer record (table) doesn't cause the Update to happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 14:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662685#M29370</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-24T14:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662686#M29371</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/people/KierenTinning"&gt;KierenTinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the clarification. Have you looked at "Message notification direction" in&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/data/relationships/relationship-class-properties.htm" title="https://pro.arcgis.com/en/pro-app/help/data/relationships/relationship-class-properties.htm"&gt;Relationship class properties—Relationships and related objects | Documentation&lt;/A&gt;&amp;nbsp;? It may provide what you need by deleting related records when the parent is deleted.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2020 19:27:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662686#M29371</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-07-24T19:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662687#M29372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;‌ thank you for the idea.&amp;nbsp; In this case though, I need to update a record in the parent when the child is deleted, I am not actually triggering deletes..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, ParentID 54 has children A, B and C&amp;nbsp; - each child has an address record.&amp;nbsp; Due to a limitation in the Arcade labeling profile, the script reads the building number from the children and writes the building numbers to the Parent as a comma separated list in a "label" field - which a labeling Arcade script processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we add Child D - it's building number when created triggers the update and the building number is written to Parent 54, so it now has building numbers from child A, B, C and D.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, if we delete child C - then the Arcade script never runs, so the Parent has building numbers from Child A, B, C and D.&amp;nbsp; If we modify a building number in child A for example, then the script runs and updated the parent removing the building number from child C.&amp;nbsp; So my problem that I am working on, is if Child C is deleted, how do I trigger an update such that the Parent will only have building numbers from A,B and D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kieren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jul 2020 04:01:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662687#M29372</guid>
      <dc:creator>KierenTinning2</dc:creator>
      <dc:date>2020-07-25T04:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - Update Feature Class based on related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662688#M29373</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/147812"&gt;Kieren Tinning&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the additional explanation. What you want to do is configure an attribute rule on the address table that is triggered by insert, update &lt;STRONG&gt;and delete&lt;/STRONG&gt;. This way you can use the new situation to modify the building numbers on the other featureclass.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2020 14:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/m-p/662688#M29373</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-07-26T14:58:53Z</dc:date>
    </item>
  </channel>
</rss>

