{"id":1755342,"date":"2022-11-08T13:05:49","date_gmt":"2022-11-08T21:05:49","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1755342"},"modified":"2022-11-17T14:22:15","modified_gmt":"2022-11-17T22:22:15","slug":"an-attribute-rule-to-keep-two-geodatabase-tables-in-sync","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync","title":{"rendered":"An Attribute Rule to keep two geodatabase tables in sync"},"author":7511,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23851],"tags":[302212],"industry":[],"product":[36561],"class_list":["post-1755342","blog","type-blog","status-publish","format-standard","hentry","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":"Attribute Rule to move edits from one geodatabase table to another","flexible_content":[{"acf_fc_layout":"content","content":"<p>A common question customers ask is how to move edits between two geodatabase tables with attribute rules so both tables are in sync with each other. For example:<\/p>\n<ul>\n<li>If you insert a row in table 1, the row is also inserted in table 2.<\/li>\n<li>If you update a row on table 2, the attributes are populated for the same row in table 1. Same goes with deletes.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Of course, your specific conditions might different from this simple example. Attribute rules are flexible enough to allow that.<\/p>\n<p>In this blog, I\u2019ll walk through how to implement this logic and explain the process along the way. To skip ahead to the result, you can <a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables_ar_blog.zip\">download the file geodatabase<\/a> which contains the final rules authored below.<\/p>\n<p>Here is what we are building.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":1755402,"id":1755402,"title":"synctables","filename":"synctables.gif","filesize":1785417,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\/synctables","alt":"","author":"7511","description":"","caption":"","name":"synctables","status":"inherit","uploaded_to":1755342,"date":"2022-10-31 23:44:01","modified":"2022-10-31 23:44:01","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":1398,"height":444,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","medium-width":464,"medium-height":147,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","medium_large-width":768,"medium_large-height":244,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","large-width":1398,"large-height":444,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","1536x1536-width":1398,"1536x1536-height":444,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","2048x2048-width":1398,"2048x2048-height":444,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables-826x262.gif","card_image-width":826,"card_image-height":262,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables.gif","wide_image-width":1398,"wide_image-height":444}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h3>Insert logic<\/h3>\n<p>To correctly apply changes and sync both tables, we need to uniquely identify the rows. Identifying unique rows in both tables is the main challenge of this task. Unfortunately, using the <em>GlobalId<\/em> or <em>ObjectId<\/em> won&#8217;t work because they are not under our control in Arcade and attribute rules.<\/p>\n<p>The best route at out disposal is to create a unique user-defined ID field and populate it with a database sequence. We can then create an attribute rule that queries a sequence to get a unique value and store it in a user-defined ID field. The rule we create lives on both tables to guarantee the creation of unique rows on each insert and across both tables.<\/p>\n<p>Let us call this the \u201csequence\u201d rule.\u00a0 To re-iterate, this rule must exist on both tables and must query the same database sequence. With this rule, created rows are globally unique to both tables and can be identified with the ID field, which is important for the next step. We can use the NextSequenceValue to get a unique sequence.<\/p>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<pre><code>\r\n    return NextSequenceValue(\"seq\")\r\n    <\/code><\/pre>\n"},{"acf_fc_layout":"content","content":"<p>With this, we can now write the logic to copy the rows to the other table. The logic to copy the rows is as follows:<\/p>\n<ul>\n<li>When we insert a row in table 1, we want to take the row and trigger an insert in the table 2 and vice versa.<\/li>\n<\/ul>\n<p>Here is the problem however; the moment the second insert is triggered, it will turn around and insert the same row in the original table causing an unending loop. Attribute rules thankfully detect this type of issue and prevent an infinite loop, but we still need to address it in our Arcade logic.<\/p>\n<p>This can be fixed by querying the other table before inserting the row using the following logic:<\/p>\n<ul>\n<li>Does the row with ID <em>$feature.id<\/em> exist in the second table? if not then call the insert by returning the <em>adds<\/em> dictionary, otherwise we exit the script with a <em>return;<\/em>.<\/li>\n<\/ul>\n<p>Of course, the attribute rule on table 1 queries table 2 and vice versa, the attribute rule on table 2 queries table 1. I used the <a href=\"https:\/\/developers.arcgis.com\/arcade\/guide\/profiles\/#globals-1\"><em>$editContext.editType<\/em><\/a> to know that an insert event is executing.<\/p>\n"},{"acf_fc_layout":"content","content":"<pre>if ($editContext.editType == \"INSERT\") {\r\n    \/\/we just inserted a new row in this table, lets check if the id exists in the destination first(to prevent an infinite cycle) \r\n\r\n    var id = $feature.id;\r\n    var fs = FeatureSetByName($datastore, \"table2\", [\"globalid\"], false);\r\n    var destinationRow = first(Filter(fs, \"id = @id\"));\r\n    if (destinationRow != null) return; \/\/the row exists, time to break the loop (additional logic here can be used to update if they are diffrent )\r\n\r\n    \/\/the row isn't in the other table, lets add it. \r\n\r\n    return {\r\n        \"edit\": [\r\n\r\n            {\r\n                \"className\": \"table2\",\r\n                \"adds\": [{\r\n                    \"attributes\": {\r\n                        \"id\": $feature.id,\r\n                        \"field\": $feature.field,\r\n                        \"field_1\": $feature.field_1,\r\n                        \"field_2\": $feature.field_2,\r\n                        \"field_3\": $feature.field_3,\r\n                        \"field_4\": $feature.field_4,\r\n                        \"field_5\": $feature.field_5\r\n                    }\r\n                }]\r\n\r\n            }\r\n        ]\r\n    }\r\n\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<p>With this change, there is still another problem! The ID field will always be overwritten with a new sequence when the row is copied to the target table. This is a side effect from the<em> sequence rule <\/em>we created.<\/p>\n<p>How do we differentiate an insert that is triggered from attribute rules vs an insert that the user performs? We can assume the user inserts the row without populating the ID field and that information is our key requirement to make this work.<\/p>\n<ul>\n<li>If the ID field is empty, generate a sequence, otherwise exit the <em>sequence<\/em> rule.<\/li>\n<\/ul>\n<p>To further guard against any issues with this logic, the ID field can be set to read only in the project so users don&#8217;t accidently edit it.<\/p>\n<p>Let&#8217;s update our <em>sequence<\/em> rule with this change.<\/p>\n"},{"acf_fc_layout":"content","content":"<p><code><\/code><\/p>\n<pre>\/\/only create a unique id if none is provided\r\nif (isempty($feature.id))\r\n    return NextSequenceValue(\"seq\")\r\nelse\r\n    return;\r\n<\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<p>The insert logic now works, let&#8217;s move on to the update.<\/p>\n"},{"acf_fc_layout":"content","content":"<h3>Update Logic<\/h3>\n<p>Now that adding rows works, the attribute rules on both tables will ensure a row with ID X exists on both tables We now want to enable the ability to update an existing row and populate the properties for the same row in the second table. To do this, we can set an update trigger to the rule, and use\u00a0<em>$editContext<\/em>\u00a0to know if we are updating.<\/p>\n<p>Knowing the edited row\u00a0<em>$feature.id from table 1<\/em>, we query table 2 to find that row, if we can\u2019t find it, something must have gone wrong so we just fail. This could happen if rows existed before the attribute rule is added. Otherwise, if no failure occurs we send an update dictionary to update the matching row on table 2. Remember, the same compensating attribute rule is present on table 2 also.<\/p>\n"},{"acf_fc_layout":"content","content":"<p><code><\/code><\/p>\n<pre>if ($editContext.editType == \"UPDATE\") {\r\n\r\n    \/\/we are updating the row, in this table, so we need to get the corrsponding row in the second table and update it. \r\n    var id = $feature.id;\r\n    var fs = FeatureSetByName($datastore, \"table2\");\r\n    var destinationRow = first(Filter(fs, \"id = @id\"));\r\n    \/\/this should not happen but catching it just in case\r\n    if (destinationRow == null) return {\r\n        \"errorMessage\": \"table out of sync!, we tried to update a row that doesn't exist in the other table.. something is wrong.\"\r\n    } \/\/we can relax that and create the row instead to sync it .\r\n\r\n    \/\/we need to prevent the update if all fields are the same (otherwise we will be in an infinite cycle\r\n\r\n    if (destinationRow.field == $feature.field &amp;&amp;\r\n        destinationRow.field_1 == $feature.field_1 &amp;&amp;\r\n        destinationRow.field_2 == $feature.field_2 &amp;&amp;\r\n        destinationRow.field_3 == $feature.field_3 &amp;&amp;\r\n        destinationRow.field_4 == $feature.field_4 &amp;&amp;\r\n        destinationRow.field_5 == $feature.field_5) return; \/\/no change quit\r\n\r\n    \/\/else lets sync them! \r\n    return {\r\n        \"edit\": [\r\n\r\n            {\r\n                \"className\": \"table2\",\r\n                \"updates\": [{\r\n                    \"globalID\": destinationRow.globalId,\r\n                    \"attributes\": {\r\n                        \"field\": $feature.field,\r\n                        \"field_1\": $feature.field_1,\r\n c                       \"field_2\": $feature.field_2,\r\n                        \"field_3\": $feature.field_3,\r\n                        \"field_4\": $feature.field_4,\r\n                        \"field_5\": $feature.field_5\r\n                    }\r\n                }]\r\n\r\n            }\r\n        ]\r\n    }\r\n\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h3>Delete logic<\/h3>\n<p>This is probably the most straight forward of our tasks.\u00a0 If we delete a row in table 1 we want to also remove it from table 2 and vice versa. To do this we can add a third condition using\u00a0<em>$editContext<\/em><\/p>\n"},{"acf_fc_layout":"content","content":"<p><code><\/code><\/p>\n<pre>if ($editContext.editType == \"DELETE\") {\r\n\r\n    \/\/we are delete the row, in this table, we need to delete the same row in the other table \r\n    var id = $feature.id;\r\n    var fs = FeatureSetByName($datastore, \"table2\", [\"globalid\"], false);\r\n    var destinationRow = first(Filter(fs, \"id = @id\"));\r\n    \/\/this should not happen but catching it just in case\r\n    if (destinationRow == null) return {\r\n        \"errorMessage\": \"table out of sync!, we tried to delete a row that doesn't exist in the other table.. something is wrong.\"\r\n    } \/\/we can relax that and no-op.. \r\n\r\n    \/\/else lets sync them! \r\n    return {\r\n        \"edit\": [\r\n\r\n            {\r\n                \"className\": \"table2\",\r\n                \"deletes\": [{\r\n                    \"globalID\": destinationRow.globalId\r\n                }]\r\n\r\n            }\r\n        ]\r\n    }\r\n\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h3>Summary<\/h3>\n<p>In this blog we wrote an attribute rule that ensures all edits in one table are performed on another table and vice versa. You could enhance this logic as needed and add certain conditions to achieve the results you are after. You can also change the rule to work on feature classes by adding the geometry keyword in the return edit dictionary.<\/p>\n<p>I hope this has been helpful.\u00a0 I\u2019ve been asked several times at conferences how to approach this so, I thought it would be good idea to make it into a blog.<\/p>\n<p><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2022\/10\/synctables_ar_blog.zip\">Download the file geodatabase with all rules<\/a> demonstrated.<\/p>\n<p>&nbsp;<\/p>\n"}],"related_articles":"","card_image":false,"wide_image":false},"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>An Attribute Rule to keep two geodatabase tables in sync<\/title>\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\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An Attribute Rule to keep two geodatabase tables in sync\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\" \/>\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=\"2022-11-17T22:22:15+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\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\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\"},\"author\":{\"name\":\"Hussein Nasser\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/78b7647b1db598b3c791d039593e5b2b\"},\"headline\":\"An Attribute Rule to keep two geodatabase tables in sync\",\"datePublished\":\"2022-11-08T21:05:49+00:00\",\"dateModified\":\"2022-11-17T22:22:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\"},\"wordCount\":10,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"attribute rules\"],\"articleSection\":[\"Data Management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\",\"name\":\"An Attribute Rule to keep two geodatabase tables in sync\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2022-11-08T21:05:49+00:00\",\"dateModified\":\"2022-11-17T22:22:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"An Attribute Rule to keep two geodatabase tables in sync\"}]},{\"@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":"An Attribute Rule to keep two geodatabase tables in sync","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\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync","og_locale":"en_US","og_type":"article","og_title":"An Attribute Rule to keep two geodatabase tables in sync","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2022-11-17T22:22:15+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync"},"author":{"name":"Hussein Nasser","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/78b7647b1db598b3c791d039593e5b2b"},"headline":"An Attribute Rule to keep two geodatabase tables in sync","datePublished":"2022-11-08T21:05:49+00:00","dateModified":"2022-11-17T22:22:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync"},"wordCount":10,"commentCount":0,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["attribute rules"],"articleSection":["Data Management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync","name":"An Attribute Rule to keep two geodatabase tables in sync","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2022-11-08T21:05:49+00:00","dateModified":"2022-11-17T22:22:15+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/an-attribute-rule-to-keep-two-geodatabase-tables-in-sync#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"An Attribute Rule to keep two geodatabase tables in sync"}]},{"@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":"November 8, 2022","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\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","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":23851,"name":"Data Management","slug":"data-management","term_group":0,"term_taxonomy_id":23851,"taxonomy":"category","description":"","parent":0,"count":921,"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":2038,"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\/1755342","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=1755342"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/1755342\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=1755342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=1755342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=1755342"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=1755342"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=1755342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}