{"id":2876702,"date":"2025-07-03T12:42:03","date_gmt":"2025-07-03T19:42:03","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2876702"},"modified":"2025-07-08T11:13:16","modified_gmt":"2025-07-08T18:13:16","slug":"listening-for-utility-network-associations-events-in-attribute-rules","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules","title":{"rendered":"Listening for Utility Network Associations Events in Attribute Rules"},"author":7511,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[777102,23851],"tags":[302212],"industry":[],"product":[36561],"class_list":["post-2876702","blog","type-blog","status-publish","format-standard","hentry","category-arcade","category-data-management","tag-attribute-rules","product-arcgis-pro"],"acf":{"authors":[{"ID":7511,"user_firstname":"Hussein","user_lastname":"Nasser","nickname":"Hussein Nasser","user_nicename":"hussein-nasser","display_name":"Hussein Nasser","user_email":"HNasser@esri.com","user_url":"http:\/\/www.husseinnasser.com","user_registered":"2018-03-21 18:21:21","user_description":"Product Engineer at Esri, Author of several GIS books and Software Engineering Content Creator on YouTube and a podcast host.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/06\/profile.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"short_description":"Learn how to write attribute rules that react to associations being added and removed.","flexible_content":[{"acf_fc_layout":"content","content":"<p>Consider this example: A transformer bank assembly feature has a\u00a0<code>totalKva<\/code>\u00a0double field. We want to author an attribute rule such that every time a new transformer unit device is associated with the bank (through a containment association), the new total is updated in the assembly. This total should be equal to the sum of the\u00a0<code>kva<\/code>\u00a0field values in all transformer content.<\/p>\n<p>On the surface, this rule is simple enough to author as a batch calculation rule on the assembly class.\u00a0Every time the user runs\u00a0<a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/geodatabases\/overview\/evaluate-attribute-rules.htm\"><code>Evaluate<\/code>\u00a0<\/a>on the transformer bank, we pull all the transformer content, sum the\u00a0<code>kva<\/code>\u00a0values, and set the value in the\u00a0<code>totalKVA<\/code> field.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p>A simple attribute rule to summarize the KVA of all the transformers contained within an assembly.<\/p>\n<pre><code>\r\n<span style=\"color: #6a737d\">\/\/Get all the content of this transformer bank<\/span>\r\n<span style=\"color: #d73a49\">var<\/span> contentRows = <span style=\"color: #e36209\">FeatureSetByAssociation<\/span>(<span style=\"color: #e36209\">$feature<\/span>, <span style=\"color: #032f62\">\"content\"<\/span>);\r\n\r\n<span style=\"color: #6a737d\">\/\/build globalid array<\/span>\r\n\r\n<span style=\"color: #d73a49\">var<\/span> globalIds = [];\r\n<span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> v <span style=\"color: #d73a49\">in<\/span> contentRows)\r\n    <span style=\"color: #e36209\">push<\/span>(globalIds, v.globalId);\r\n\r\n<span style=\"color: #d73a49\">var<\/span> totalKVA = <span style=\"color: #005cc5\">0<\/span>;\r\n<span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">count<\/span>(globalIds) &amp;gt; <span style=\"color: #005cc5\">0<\/span>) {\r\n\r\n    <span style=\"color: #6a737d\">\/\/query the device class\u00a0<\/span>\r\n    <span style=\"color: #d73a49\">var<\/span> deviceClass = <span style=\"color: #e36209\">FeatureSetByName<\/span>(<span style=\"color: #e36209\">$datastore<\/span>, <span style=\"color: #032f62\">\"main.ElectricDistributionDevice\"<\/span>, [<span style=\"color: #032f62\">\"kva\"<\/span>], <span style=\"color: #005cc5\">false<\/span>);\r\n    <span style=\"color: #d73a49\">var<\/span> devicesRows = <span style=\"color: #e36209\">Filter<\/span>(deviceClass, <span style=\"color: #032f62\">\"globalid in @globalIds\"<\/span>);\r\n\r\n    totalKVA = <span style=\"color: #e36209\">sum<\/span>(devicesRows, <span style=\"color: #032f62\">\"kva\"<\/span>);\r\n\r\n}\r\n\r\n<span style=\"color: #d73a49\">return<\/span> totalKVA;\r\n\r\n<\/code><\/pre>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"\/\/Get all the content of this transformer bank\r\nvar contentRows = FeatureSetByAssociation($feature, \"content\");\r\n\r\n\/\/build globalid array\r\n\r\nvar globalIds = [];\r\nfor (var v in contentRows)\r\n    push(globalIds, v.globalId);\r\n\r\nvar totalKVA = 0;\r\nif (count(globalIds) &gt; 0) {\r\n\r\n    \/\/query the device class\u00a0\r\n    var deviceClass = FeatureSetByName($datastore, \"main.ElectricDistributionDevice\", [\"kva\"], false);\r\n    var devicesRows = Filter(deviceClass, \"globalid in @globalIds\");\r\n\r\n    totalKVA = sum(devicesRows, \"kva\");\r\n\r\n}\r\n\r\nreturn totalKVA;","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>However, this approach has a few limitations:<\/p>\n<ul>\n<li>It requires an additional step to calculate the value (<code>Evaluate<\/code>).<\/li>\n<li>The value may be incorrect and cannot be trusted until\u00a0<code>Evaluate<\/code>\u00a0is run.<\/li>\n<li>It requires a compensating rule to mark the assembly as requiring calculation when a device is attached.<\/li>\n<li>It is only supported on mobile, file geodatabase, and branch versioned classes.<\/li>\n<\/ul>\n<p>In this blog, we will author this rule as an immediate calculation rule. To do that, we need to know when an association is added and when an association is removed. The final result will look something like this after we are done.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2878062,"id":2878062,"title":"associations","filename":"associations.gif","filesize":2328256,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\/associations-5","alt":"","author":"7511","description":"","caption":"","name":"associations-5","status":"inherit","uploaded_to":2876702,"date":"2025-07-03 18:10:50","modified":"2025-07-03 18:12:36","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":944,"height":650,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","medium-width":379,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","medium_large-width":768,"medium_large-height":529,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","large-width":944,"large-height":650,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","1536x1536-width":944,"1536x1536-height":650,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","2048x2048-width":944,"2048x2048-height":650,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations-675x465.gif","card_image-width":675,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/associations.gif","wide_image-width":944,"wide_image-height":650}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h3>What happens when an association is added or removed?<\/h3>\n<p>When we add a containment association between a parent and child, the\u00a0<a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/utility-network\/association-status-attribute.htm\"><code>associationstatus<\/code>\u00a0<\/a>field gets updated with the status bit representing the state of the feature. For example:<\/p>\n<ul>\n<li>When the assembly doesn&#8217;t have any content, its\u00a0<code>associationstatus<\/code>\u00a0field is set to <em>None (0).<\/em><\/li>\n<li>When content is added, the status changes to <em>Container (1)<\/em>, while the content feature\u00a0<code>associationstatus<\/code>\u00a0gets updated to<em> Content (4)<\/em>. We will listen to a change for those values in attribute rules and author the rule accordingly. If a change is detected in this field, we can use it to trigger the rule, sum the value, and update the assembly.<\/li>\n<\/ul>\n<h3>What if the assembly is already a container?<\/h3>\n<p>The thing to watch for is if the bank is already a container, adding more transformer units won\u2019t update the bank\u00a0<code>associationstatus<\/code>, and as a result, the rule won\u2019t trigger on the bank. However, the content devices&#8217; <code>associationstatus<\/code>\u00a0will always change, providing a hook for the attribute rule to update the bank.<\/p>\n<p>If the content is removed, the\u00a0<code>associationstatus<\/code>\u00a0is changed to <em>None (0)<\/em>. If content is added, it will be changed to <em>Content (4)<\/em>. In both cases, we can use that knowledge to write an Attribute rule to update the parent container.<\/p>\n<p>So, we will implement all this logic against the content.<\/p>\n<h3>How to know if a containment association has been added?<\/h3>\n<p>To determine if an association has been added, check the content bit on the\u00a0<code>$originalFeature.associationStatus<\/code>\u00a0(the value before the update) and the\u00a0<code>$feature.associationStatus<\/code>\u00a0(the value after the update). If the content bit is not set on the\u00a0<code>$originalFeature.associationStatus<\/code>\u00a0and it is set on\u00a0<code>$feature.associationStatus<\/code>, we know an association has been added. We will use the bitwise operator <em>&amp;<\/em> to extract bit 4 (content)<code><br \/>\n<\/code><\/p>\n"},{"acf_fc_layout":"sidebar","content":"<pre>You can see an example of this check below:\r\n<code>\r\n<span style=\"color: #6a737d\">\/\/ Containment association has been added<\/span>\r\n<span style=\"color: #d73a49\">if<\/span> ((<span style=\"color: #e36209\">$feature<\/span>.associationstatus &amp; CONTENT_BIT) == CONTENT_BIT &amp;&amp; (<span style=\"color: #e36209\">$originalfeature<\/span>.associationstatus &amp; CONTENT_BIT) == <span style=\"color: #005cc5\">0<\/span>)\r\n<span style=\"color: #6a737d\">\/\/\/code here<\/span>\r\n\r\n<\/code><\/pre>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<h3>How to know if a containment association has been removed?<\/h3>\n<p>To identify if an association has been removed, check the content bit on the\u00a0<code>$originalFeature.associationStatus<\/code>\u00a0(the value before the update) and the\u00a0<code>$feature.associationStatus<\/code>\u00a0(the value after the update). If the content bit is set on the\u00a0<code>$originalFeature.associationStatus<\/code>\u00a0and it&#8217;s unset on\u00a0<code>$feature.associationStatus<\/code>, we know an association has been removed.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p>You can see an example of this check below:<\/p>\n<pre><code>\r\n<span style=\"color: #6a737d\">\/\/ Containment association has been removed<\/span>\r\n<span style=\"color: #d73a49\">if<\/span> ((<span style=\"color: #e36209\">$feature<\/span>.associationstatus &amp; CONTENT_BIT) == <span style=\"color: #005cc5\">0<\/span> &amp;&amp; (<span style=\"color: #e36209\">$originalfeature<\/span>.associationstatus &amp; CONTENT_BIT) == CONTENT_BIT)\r\n<span style=\"color: #6a737d\">\/\/\/code here<\/span>\r\n\r\n<\/code><\/pre>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>Next let&#8217;s look at how to determine if the parent container for content has been removed.<\/p>\n"},{"acf_fc_layout":"content","content":"<h3>How to find the parent container if content is removed?<\/h3>\n<p>The challenge arises when content is removed from the association, and we can no longer find the container using\u00a0<code>FeatureSetByAssociation<\/code>. When we delete an association in the utility network, it is marked as deleted but not physically deleted.\u00a0<code>FeatureSetByAssociation<\/code>\u00a0filters out logically deleted associations, making it impossible to find the container using the method after the association is removed. To solve this, we can query the association table directly to locate the parent and mark the update. The association table is just another table that we can query.<\/p>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<pre><code>\r\n<span style=\"color: #d73a49\">var<\/span> transformerGlobalId = <span style=\"color: #e36209\">$feature<\/span>.globalId;\r\n<span style=\"color: #d73a49\">var<\/span> containerRows\r\n<span style=\"color: #d73a49\">var<\/span> transformerBankAssociationRow\r\n<span style=\"color: #d73a49\">var<\/span> transformerBankGlobalId\r\n<span style=\"color: #d73a49\">var<\/span> CONTENT_BIT = <span style=\"color: #005cc5\">4<\/span>;\r\n\r\n<span style=\"color: #6a737d\">\/\/To find the parent, we need to query the association table directly instead of FeatureSetByAssociation so we can get the logically deleted associations.<\/span>\r\n<span style=\"color: #6a737d\">\/\/we only want to use this when the association is removed<\/span>\r\n\r\n<span style=\"color: #d73a49\">if<\/span> ((<span style=\"color: #e36209\">$feature<\/span>.associationstatus &amp; CONTENT_BIT) == <span style=\"color: #005cc5\">0<\/span> &amp;&amp; (<span style=\"color: #e36209\">$originalfeature<\/span>.associationstatus &amp; CONTENT_BIT) == CONTENT_BIT) {\r\n\r\n    containerRows = <span style=\"color: #e36209\">Filter<\/span>(<span style=\"color: #e36209\">FeatureSetByName<\/span>(<span style=\"color: #e36209\">$datastore<\/span>, <span style=\"color: #032f62\">\"main.UN_6_Associations\"<\/span>), <span style=\"color: #032f62\">\"TOGLOBALID = @transformerGlobalId AND ASSOCIATIONTYPE = 2\"<\/span>) <span style=\"color: #6a737d\">\/\/ FeatureSetByAssociation($feature, \"container\")<\/span>\r\n\r\n    <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">count<\/span>(containerRows) == <span style=\"color: #005cc5\">0<\/span>) <span style=\"color: #d73a49\">return<\/span>;\r\n\r\n    transformerBankAssociationRow = <span style=\"color: #e36209\">first<\/span>(containerRows)\r\n    transformerBankGlobalId = transformerBankAssociationRow.fromglobalid;\r\n}\r\n<span style=\"color: #6a737d\">\/\/any other update just do a normal update<\/span>\r\n<span style=\"color: #d73a49\">else<\/span> {\r\n    containerRows = <span style=\"color: #e36209\">FeatureSetByAssociation<\/span>(<span style=\"color: #e36209\">$feature<\/span>, <span style=\"color: #032f62\">\"container\"<\/span>)\r\n\r\n    <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">count<\/span>(containerRows) == <span style=\"color: #005cc5\">0<\/span>) <span style=\"color: #d73a49\">return<\/span>;\r\n\r\n    transformerBankAssociationRow = <span style=\"color: #e36209\">first<\/span>(containerRows)\r\n    transformerBankGlobalId = transformerBankAssociationRow.globalid;\r\n}\r\n\r\n<span style=\"color: #e36209\">console<\/span>(<span style=\"color: #032f62\">\"ARCADE -- FOUND THE BANK \"<\/span> + transformerBankGlobalId)\r\n\r\n<span style=\"color: #d73a49\">var<\/span> transformerBanks = <span style=\"color: #e36209\">FeatureSetByName<\/span>(<span style=\"color: #e36209\">$datastore<\/span>, <span style=\"color: #032f62\">\"main.ElectricDistributionAssembly\"<\/span>, [<span style=\"color: #032f62\">\"totalkva\"<\/span>, <span style=\"color: #032f62\">\"globalId\"<\/span>], <span style=\"color: #005cc5\">false<\/span>)\r\n\r\n<span style=\"color: #d73a49\">var<\/span> transformerBank = <span style=\"color: #e36209\">First<\/span>(<span style=\"color: #e36209\">Filter<\/span>(transformerBanks, <span style=\"color: #032f62\">\"globalid = @transformerBankGlobalId\"<\/span>));\r\n<span style=\"color: #d73a49\">var<\/span> contentRows = <span style=\"color: #e36209\">FeatureSetByAssociation<\/span>(transformerBank, <span style=\"color: #032f62\">\"content\"<\/span>)\r\n<span style=\"color: #d73a49\">var<\/span> globalIds = [];\r\n<span style=\"color: #d73a49\">var<\/span> i = <span style=\"color: #005cc5\">0<\/span>;\r\n<span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> v <span style=\"color: #d73a49\">in<\/span> contentRows)\r\n    <span style=\"color: #e36209\">push<\/span>(globalIds, v.globalId)\r\n\r\n<span style=\"color: #d73a49\">var<\/span> totalKVA = <span style=\"color: #005cc5\">0<\/span>\r\n\r\n<span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">count<\/span>(globalIds) &gt; <span style=\"color: #005cc5\">0<\/span>) {\r\n    <span style=\"color: #d73a49\">var<\/span> deviceClass = <span style=\"color: #e36209\">FeatureSetByName<\/span>(<span style=\"color: #e36209\">$datastore<\/span>, <span style=\"color: #032f62\">\"main.ElectricDistributionDevice\"<\/span>, [<span style=\"color: #032f62\">\"kva\"<\/span>], <span style=\"color: #005cc5\">false<\/span>)\r\n\r\n    <span style=\"color: #d73a49\">var<\/span> devicesRows = <span style=\"color: #e36209\">Filter<\/span>(deviceClass, <span style=\"color: #032f62\">\"globalid  @transformerGlobalId\"<\/span>)\r\n\r\n    <span style=\"color: #d73a49\">var<\/span> devicesRows = <span style=\"color: #e36209\">Filter<\/span>(devicesRows, <span style=\"color: #032f62\">\"globalid in @globalIds\"<\/span>)\r\n\r\n    totalKVA = <span style=\"color: #e36209\">sum<\/span>(devicesRows, <span style=\"color: #032f62\">\"kva\"<\/span>)\r\n\r\n}\r\n\r\n\r\n\r\n<span style=\"color: #6a737d\">\/\/if it is a remove or a delete don't count the current kva<\/span>\r\n<span style=\"color: #d73a49\">if<\/span> (!((<span style=\"color: #e36209\">$feature<\/span>.associationstatus == <span style=\"color: #005cc5\">0<\/span> &amp;&amp; <span style=\"color: #e36209\">$originalfeature<\/span>.associationstatus &gt; <span style=\"color: #005cc5\">0<\/span>) || (<span style=\"color: #e36209\">$editContext<\/span>.editType == <span style=\"color: #032f62\">\"DELETE\"<\/span>)))\r\n    totalKVA += <span style=\"color: #e36209\">$feature<\/span>.kva;\r\n\r\n<span style=\"color: #d73a49\">return<\/span> {\r\n    <span style=\"color: #032f62\">\"edit\"<\/span>: [{\r\n\r\n        <span style=\"color: #032f62\">\"className\"<\/span>: <span style=\"color: #032f62\">\"main.ElectricDistributionAssembly\"<\/span>,\r\n        <span style=\"color: #032f62\">\"updates\"<\/span>: [{\r\n\r\n            <span style=\"color: #032f62\">\"globalID\"<\/span>: transformerBankGlobalId,\r\n            <span style=\"color: #032f62\">\"attributes\"<\/span>: {\r\n                <span style=\"color: #032f62\">\"totalkva\"<\/span>: totalKVA\r\n            }\r\n        }]\r\n    }]\r\n}\r\n\r\n\r\n<\/code><\/pre>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>You can download the Mobile Geodatabase test data with this rule <a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/UpdateKVA_TransformerAttributeRule.zip\">here<\/a>.<\/p>\n<p>If you have any questions about this article, Arcade expressions, or attribute rule please visit the <a href=\"https:\/\/community.esri.com\/t5\/arcgis-arcade\/gh-p\/arcgis-arcade\">ArcGIS Arcade<\/a> page on the Esri Community site.<\/p>\n"}],"show_article_image":true,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/Image-8.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/Image-11.png","related_articles":[{"ID":668832,"post_author":"7511","post_date":"2020-02-06 12:07:17","post_date_gmt":"2020-02-06 20:07:17","post_content":"","post_title":"$originalFeature - New Attribute Rules Arcade Global","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"originalfeature-new-attribute-rules-arcade-global","to_ping":"","pinged":"","post_modified":"2024-11-11 12:31:25","post_modified_gmt":"2024-11-11 20:31:25","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=668832","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":668662,"post_author":"7511","post_date":"2019-02-11 13:53:36","post_date_gmt":"2019-02-11 21:53:36","post_content":"","post_title":"Advanced Attribute Rules - Creating Utility Network Associations with attribute Rules","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"advanced-attribute-rules-creating-utility-network-associations-with-attribute-rules","to_ping":"","pinged":"","post_modified":"2020-02-19 07:22:01","post_modified_gmt":"2020-02-19 15:22:01","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=668662","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"1","filter":"raw"},{"ID":2592882,"post_author":"7511","post_date":"2024-12-08 18:10:10","post_date_gmt":"2024-12-09 02:10:10","post_content":"","post_title":"Attribute Rules Triggering Fields in ArcGIS Pro 3.4","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"attribute-rules-triggering-fields","to_ping":"","pinged":"","post_modified":"2024-12-09 13:25:34","post_modified_gmt":"2024-12-09 21:25:34","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2592882","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"8","filter":"raw"}]},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Listening for Utility Network Associations Events in Attribute Rules<\/title>\n<meta name=\"description\" content=\"Learn how to write attribute rules that react to associations being added and removed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Listening for Utility Network Associations Events in Attribute Rules\" \/>\n<meta property=\"og:description\" content=\"Learn how to write attribute rules that react to associations being added and removed.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-08T18:13:16+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\"},\"author\":{\"name\":\"Hussein Nasser\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/78b7647b1db598b3c791d039593e5b2b\"},\"headline\":\"Listening for Utility Network Associations Events in Attribute Rules\",\"datePublished\":\"2025-07-03T19:42:03+00:00\",\"dateModified\":\"2025-07-08T18:13:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\"},\"wordCount\":9,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"attribute rules\"],\"articleSection\":[\"Arcade\",\"Data Management\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\",\"name\":\"Listening for Utility Network Associations Events in Attribute Rules\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2025-07-03T19:42:03+00:00\",\"dateModified\":\"2025-07-08T18:13:16+00:00\",\"description\":\"Learn how to write attribute rules that react to associations being added and removed.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Listening for Utility Network Associations Events in Attribute Rules\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/78b7647b1db598b3c791d039593e5b2b\",\"name\":\"Hussein Nasser\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/06\/profile.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/06\/profile.png\",\"caption\":\"Hussein Nasser\"},\"description\":\"Product Engineer at Esri, Author of several GIS books and Software Engineering Content Creator on YouTube and a podcast host.\",\"sameAs\":[\"http:\/\/www.husseinnasser.com\",\"https:\/\/www.linkedin.com\/in\/hnaser\/\",\"https:\/\/x.com\/hnasr\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/hussein-nasser\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Listening for Utility Network Associations Events in Attribute Rules","description":"Learn how to write attribute rules that react to associations being added and removed.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules","og_locale":"en_US","og_type":"article","og_title":"Listening for Utility Network Associations Events in Attribute Rules","og_description":"Learn how to write attribute rules that react to associations being added and removed.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2025-07-08T18:13:16+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules"},"author":{"name":"Hussein Nasser","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/78b7647b1db598b3c791d039593e5b2b"},"headline":"Listening for Utility Network Associations Events in Attribute Rules","datePublished":"2025-07-03T19:42:03+00:00","dateModified":"2025-07-08T18:13:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules"},"wordCount":9,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["attribute rules"],"articleSection":["Arcade","Data Management"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules","name":"Listening for Utility Network Associations Events in Attribute Rules","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2025-07-03T19:42:03+00:00","dateModified":"2025-07-08T18:13:16+00:00","description":"Learn how to write attribute rules that react to associations being added and removed.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/listening-for-utility-network-associations-events-in-attribute-rules#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Listening for Utility Network Associations Events in Attribute Rules"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/78b7647b1db598b3c791d039593e5b2b","name":"Hussein Nasser","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/06\/profile.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/06\/profile.png","caption":"Hussein Nasser"},"description":"Product Engineer at Esri, Author of several GIS books and Software Engineering Content Creator on YouTube and a podcast host.","sameAs":["http:\/\/www.husseinnasser.com","https:\/\/www.linkedin.com\/in\/hnaser\/","https:\/\/x.com\/hnasr"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/hussein-nasser"}]}},"text_date":"July 3, 2025","author_name":"Hussein Nasser","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/hussein-nasser","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/07\/Image-11.png","primary_product":"ArcGIS Pro","tag_data":[{"term_id":302212,"name":"attribute rules","slug":"attribute-rules","term_group":0,"term_taxonomy_id":302212,"taxonomy":"post_tag","description":"","parent":0,"count":35,"filter":"raw"}],"category_data":[{"term_id":777102,"name":"Arcade","slug":"arcade","term_group":0,"term_taxonomy_id":777102,"taxonomy":"category","description":"","parent":0,"count":100,"filter":"raw"},{"term_id":23851,"name":"Data Management","slug":"data-management","term_group":0,"term_taxonomy_id":23851,"taxonomy":"category","description":"","parent":0,"count":945,"filter":"raw"}],"product_data":[{"term_id":36561,"name":"ArcGIS Pro","slug":"arcgis-pro","term_group":0,"term_taxonomy_id":36561,"taxonomy":"product","description":"","parent":0,"count":2098,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-pro","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2876702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/7511"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2876702"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2876702\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2876702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2876702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2876702"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2876702"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2876702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}