<?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>idea Attribute Rule to update automatically on update in Attribute Rules Ideas</title>
    <link>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idi-p/1120959</link>
    <description>&lt;P&gt;It would be great to have an Attribute Rule which updates a feature class based on an intersect of another layer when a value of the intersecting layer is updated.&amp;nbsp; Upon creating and / or updating this can be done using Arcade, however, if an attribute is being populated based off the intersecting shape there is currently no Attribute Rule which automatically updates the intersecting layer(s) when an attribute is changed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, a zone polygon feature class contains an attribute ‘inspector name’.&amp;nbsp; There is a point feature class of poles to be inspected and within this point layer there is an attribute which populates the inspector based on the zone polygon. An attribute rule can be created for create / update so if a point is placed within that zone polygon the name of the inspector would populate the point layer. However, if the inspector of that zone is changed (aka new name), the associated points within that zone do not automatically update.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 20:06:12 GMT</pubDate>
    <dc:creator>JessieAerts2</dc:creator>
    <dc:date>2021-11-29T20:06:12Z</dc:date>
    <item>
      <title>Update attributes using real time.</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idc-p/1111332#M307</link>
      <description>&lt;P&gt;I think that it would be a huge help if attribute rules could be instilled with the option for a check box to update using 'Real Time'. Meaning that if that option is checked, regardless of the feature being published or not, that the feature would update based on real time. It seems rather strange that only a few triggers exist currently for attribute rules (Insert, Update, Delete), but having the option of selecting real time would be extremely helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 16:48:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idc-p/1111332#M307</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2021-10-26T16:48:20Z</dc:date>
    </item>
    <item>
      <title>Attribute Rule to update automatically on update</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idi-p/1120959</link>
      <description>&lt;P&gt;It would be great to have an Attribute Rule which updates a feature class based on an intersect of another layer when a value of the intersecting layer is updated.&amp;nbsp; Upon creating and / or updating this can be done using Arcade, however, if an attribute is being populated based off the intersecting shape there is currently no Attribute Rule which automatically updates the intersecting layer(s) when an attribute is changed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, a zone polygon feature class contains an attribute ‘inspector name’.&amp;nbsp; There is a point feature class of poles to be inspected and within this point layer there is an attribute which populates the inspector based on the zone polygon. An attribute rule can be created for create / update so if a point is placed within that zone polygon the name of the inspector would populate the point layer. However, if the inspector of that zone is changed (aka new name), the associated points within that zone do not automatically update.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 20:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idi-p/1120959</guid>
      <dc:creator>JessieAerts2</dc:creator>
      <dc:date>2021-11-29T20:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to update automatically on update</title>
      <link>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idc-p/1121169#M33</link>
      <description>&lt;P&gt;You have to create an attribute rule in the zone polygon fc for that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Attribute Rule on the polygon FC
// triggers: Update
// field: empty

// if Inspector didn't change, do nothing
if($feature.Inspector == $originalfeature.Inspector) { return }

// load the points
var poles_fs = FeatureSetByName($datastore, "Poles", ["GlobalID"], true)

// get the points inside the polygon
poles_fs = Intersects(poles_fs, $feature)

// create and fill an array with edits to the point fc
var updates = []
for(var pole in poles_fs) {
  Push(updates, {"globalID": pole.GlobalID, "attributes": {"Inspector": $feature.Inspector}})
}

// return
// instead of returning a value for a single field, you can return a dicitionary. for more info on that:
// https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm
return {"edit": [{"className": "Poles", "updates": updates}]}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Nov 2021 08:45:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-ideas/attribute-rule-to-update-automatically-on-update/idc-p/1121169#M33</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-11-30T08:45:54Z</dc:date>
    </item>
  </channel>
</rss>

