{"id":2643142,"date":"2025-01-14T12:42:19","date_gmt":"2025-01-14T20:42:19","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2643142"},"modified":"2025-09-25T10:12:01","modified_gmt":"2025-09-25T17:12:01","slug":"attribute-rules-generate-id","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id","title":{"rendered":"Template Attribute Rules &#8211; Generate ID"},"author":365172,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23851],"tags":[42181,302212,86442,25381,777832],"industry":[],"product":[36561],"class_list":["post-2643142","blog","type-blog","status-publish","format-standard","hentry","category-data-management","tag-arcgis-pro","tag-attribute-rules","tag-data-management","tag-geodatabase","tag-template-attribute-rules","product-arcgis-pro"],"acf":{"authors":[{"ID":365172,"user_firstname":"Mihail","user_lastname":"Kaburis","nickname":"Mihail Kaburis","user_nicename":"mkaburis","display_name":"Mihail Kaburis","user_email":"mkaburis@esri.com","user_url":"","user_registered":"2024-11-20 00:37:26","user_description":"","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/uc_2024_profile_stamford-468x465.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"short_description":"Generate ID template attribute rules allow you to auto generate IDs for features while editing.","flexible_content":[{"acf_fc_layout":"content","content":"<p><span data-contrast=\"auto\">In ArcGIS Pro 3.4 we have introduced three new templates that allow you to generate attribute rules tailored for specific workflows. We curated a selection of commonly used attribute rules and created a familiar geoprocessing tool experience that guides you through their creation. Attribute rule templates not only speed up the generation of these rules but also makes them more accessible for users who may not have prior knowledge of Arcade scripting.<\/span><\/p>\n<p>The Generate ID template attribute rule tool allows us to populate a field with custom-formatted ID values when inserting or updating features. This blog describes a workflow for creating and utilizing a Generate ID template attribute rule to add formatted ID values to fire hydrants in a suburb of Baltimore, Maryland. Imagine placing down some fire hydrant point features on a map and seeing the following behavior:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2642762,"id":2642762,"title":"GenerateIDTemplateAR","filename":"GenerateIDTemplateAR.gif","filesize":1571454,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\/generateidtemplatear","alt":"","author":"365172","description":"","caption":"","name":"generateidtemplatear","status":"inherit","uploaded_to":2643142,"date":"2025-01-01 01:07:11","modified":"2025-02-11 18:14:05","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":1918,"height":1026,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR.gif","medium-width":464,"medium-height":248,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR.gif","medium_large-width":768,"medium_large-height":411,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR.gif","large-width":1918,"large-height":1026,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR-1536x822.gif","1536x1536-width":1536,"1536x1536-height":822,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR.gif","2048x2048-width":1918,"2048x2048-height":1026,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR-826x442.gif","card_image-width":826,"card_image-height":442,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GenerateIDTemplateAR.gif","wide_image-width":1918,"wide_image-height":1026}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Uniquely identifying data is a common data management workflow, often accomplished by tagging features with unique ID values. Typically these IDs must follow a standardized format, such as <code>prefix_ID#_Suffix<\/code> \u00a0&#8211; such as, <code>Asset_387_west<\/code>. Imagine that we work for the City of Baltimore\u2019s GIS department and are tasked with creating a map of fire hydrants in a neighborhood. The city\u2019s fire department requires fire hydrant IDs in the format <code>hyd_#####<\/code> where <code>#<\/code>\u00a0 represents the ID of the fire hydrant. If the ID value has less than five digits, we will pad the ID with leading zeros. For example, a hydrant with <code>ID = 1<\/code>, would format as <code>hyd_00001<\/code>.<\/p>\n<p>Manually adding fire hydrant IDs to a map containing hundreds of features is extremely tedious and prone to errors, such as duplicate values and typos. The Generate ID template attribute rule automates incrementing and formatting ID values for us! Once the rule is configured, we simply add new hydrant features to a map and the formatted ID values appear automatically.<\/p>\n<p><span data-ccp-props=\"{}\">Here\u2019s a brief overview video of the Generate ID Attribute Rule tool (<em><strong>note:<\/strong><\/em> labeling on the ID values has been enabled so we can see the formatted values on the map):<\/span><\/p>\n"},{"acf_fc_layout":"kaltura","video_id":"1_nklj5i5p","time":false,"start":0,"stop":""},{"acf_fc_layout":"content","content":"<h2><strong>Utilizing the Generate ID Attribute Rule Tool<\/strong><\/h2>\n<h3><strong>Review Generate Symbol Rotation Data<\/strong><\/h3>\n<p><span class=\"TextRun SCXW245505625 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW245505625 BCX0\"><strong>Note:<\/strong> Attribute Rules <\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">require<\/span><span class=\"NormalTextRun SCXW245505625 BCX0\"> an <\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">ArcGIS Pro <\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">S<\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">tandard or <\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">A<\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">dvance<\/span><span class=\"NormalTextRun SCXW245505625 BCX0\">d<\/span><span class=\"NormalTextRun SCXW245505625 BCX0\"> license level. To learn more please refer to the <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/get-started\/license-levels.htm\">ArcGIS Pro license levels help documentation<\/a>.<\/span><\/span><\/p>\n<ol>\n<li><span data-contrast=\"auto\">Download the <a href=\"https:\/\/arcg.is\/1LHXzj1\" target=\"_blank\" rel=\"noopener\">TemplatedARs_GenerateIDs.ppkx<\/a> <\/span><span data-contrast=\"auto\">project package file and then click on the file to open the TemplatedARs_GenerateID project. This project contains data to step through the workflow in this blog.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">When the project opens the <strong>Hydrants Map<\/strong> is active, containing a feature class of fire hydrant points with labeling enabled.<\/span><\/li>\n<\/ol>\n"},{"acf_fc_layout":"image","image":{"ID":2937629,"id":2937629,"title":"GenerateID_FireHydrantStartingMap","filename":"GenerateID_FireHydrantStartingMap-e1756331790789.jpg","filesize":33600,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\/generateid_firehydrantstartingmap","alt":"","author":"365172","description":"","caption":"","name":"generateid_firehydrantstartingmap","status":"inherit","uploaded_to":2643142,"date":"2025-08-27 19:17:35","modified":"2025-08-27 19:17:35","menu_order":0,"mime_type":"image\/jpeg","type":"image","subtype":"jpeg","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":800,"height":512,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-213x200.jpg","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","medium-width":408,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","medium_large-width":768,"medium_large-height":492,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","large-width":800,"large-height":512,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","1536x1536-width":800,"1536x1536-height":512,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","2048x2048-width":800,"2048x2048-height":512,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-727x465.jpg","card_image-width":727,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_FireHydrantStartingMap-e1756331790789.jpg","wide_image-width":800,"wide_image-height":512}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>First, right-click on the Fire Hydrants layer in the Contents pane. From the context menu, click on <strong>Data Design &gt; Attribute Rules<\/strong>. The Attribute Rules Data Design view will open.<\/p>\n<p>In the ribbon, click on the bottom half of the <strong>Calculation Rule<\/strong> button. From the context menu, select <strong>Templates<\/strong> <strong>&gt; Generate ID<\/strong>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2642792,"id":2642792,"title":"GeneratIDContextMenuOption","filename":"GeneratIDContextMenuOption.png","filesize":45790,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\/generatidcontextmenuoption","alt":"","author":"365172","description":"","caption":"","name":"generatidcontextmenuoption","status":"inherit","uploaded_to":2643142,"date":"2025-01-01 02:05:06","modified":"2025-02-11 18:14:05","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":449,"height":257,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","medium-width":449,"medium-height":257,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","medium_large-width":449,"medium_large-height":257,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","large-width":449,"large-height":257,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","1536x1536-width":449,"1536x1536-height":257,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","2048x2048-width":449,"2048x2048-height":257,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","card_image-width":449,"card_image-height":257,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/GeneratIDContextMenuOption.png","wide_image-width":449,"wide_image-height":257}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The Generate ID Template Attribute Rule GP tool dialog opens.<\/p>\n<h3><strong>Tool Overview<\/strong><\/h3>\n"},{"acf_fc_layout":"image","image":{"ID":2643072,"id":2643072,"title":"GenerateIDTool","filename":"GenerateIDTool.png","filesize":65203,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\/generateidtool","alt":"","author":"365172","description":"","caption":"","name":"generateidtool","status":"inherit","uploaded_to":2643142,"date":"2025-01-02 20:06:13","modified":"2025-02-11 18:14:05","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":499,"height":1019,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","medium-width":128,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","medium_large-width":499,"medium_large-height":1019,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","large-width":499,"large-height":1019,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","1536x1536-width":499,"1536x1536-height":1019,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","2048x2048-width":499,"2048x2048-height":1019,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool-228x465.png","card_image-width":228,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateIDTool.png","wide_image-width":499,"wide_image-height":1019}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<ol>\n<li>The <strong>Expression <\/strong>parameter allows us to specify a subset of the features we\u2019d like to apply the Generate ID rule to using a SQL expression. Since we want all of the fire hydrant features to have formatted ID values we\u2019ll leave this parameter as is (this is default).<\/li>\n<li>The <strong>Field<\/strong> parameter allows us to specify the field that we\u2019d like ID values to be written to. Let\u2019s choose HydrantID.<\/li>\n<li>The <strong>Create Sequences <\/strong>parameter allows us to choose if we\u2019d like the Generate ID tool to create database sequences for the IDs we specify. Numeric values associated with IDs are stored in database sequences. The rule increments the sequence every time it is triggered. You might choose to disable this option if you already have existing database sequences you\u2019d like to use.<\/li>\n<li>The <strong>Definition Type<\/strong> parameter allows us to define the format of the ID. There are three options:<\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>Builder<\/strong> \u2013 The ID format will be constructed using the ID Builder. This is the option we will use (choose it from the dropdown).<\/li>\n<li><strong>Table<\/strong> &#8211; The ID format will be defined from a table using the ID Definition Table parameter.\n<ul>\n<li>If you run the Generate ID Template Attribute Rule GP tool from the Geoprocessing Pane rather than from the Attribute Rules Data Design View, the output folder includes an ID Definition Table .csv file.<\/li>\n<li>The ID Definition Table is a table of the sequence definition configurations. You can edit and reuse the IDs you configured when you select this parameter. Simply select the .csv file from your file system!<\/li>\n<\/ul>\n<\/li>\n<li><strong>Coded Values<\/strong> \u2013 An ID configuration entry and sequence will be generated for each combination of coded values or subtypes from selected fields.\n<ul>\n<li><em><strong>Pro Tip:<\/strong> <\/em>To configure the formatting of ID values generated using this definition I recommend using the ID Definition Table generated when running the tool via the Geoprocessing Pane. Run the tool with the Create Sequences option disabled. Edit the formatting of the IDs in the ID Definition Table using a text editor of your choice. Afterwards, rerun the tool with the Table Definition Type.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"5\">\n<li>The <strong>ID Builder<\/strong> parameter allows us to configure IDs we\u2019d like the template attribute rule to generate. Let\u2019s format our fire hydrant IDs to match the specifications provided by the city (<code>hyd_#####<\/code>):<\/li>\n<\/ol>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li style=\"list-style-type: none\">\n<ol type=\"a\">\n<li><strong>Filter SQL<\/strong> allows us to specify an optional SQL expression to select which features we\u2019d like to apply the ID to based on attribute values. In our example, we want our hydrant ID value to be added to <em>all<\/em> fire hydrants so we&#8217;ll leave the parameter as is.<\/li>\n<li><strong>Description<\/strong> is an optional description for the ID value that will be added to the rule settings for the attribute rule. Let\u2019s give our ID the following description: \u201cIDs for fire hydrants.\u201d<\/li>\n<li><strong>Sequence Name<\/strong> is the name of the database sequence to be created. Let\u2019s call our database sequence \u201cHydrantIDs\u201d<\/li>\n<li><strong>Starting Value<\/strong> is the starting number of the sequence. We already have manually added ID values for the first three hydrants, so let\u2019s start our sequence at \u201c4\u201d (the default value is 1).<\/li>\n<li><strong>Increment Value <\/strong>describes how the sequence value will be incremented. Let\u2019s set our increment value to 1 (this is default).<\/li>\n<li><strong>Prefix <\/strong>is an optional string or value that will be placed before the sequence value. Since we want our hydrant IDs in the format <code>hyd_#####<\/code> we should set our prefix to \u201chyd_\u201d.<\/li>\n<li><strong>Suffix<\/strong> is an optional string or value that will be placed after the sequence value.<\/li>\n<li><strong>Padding<\/strong> is an optional positive number that represents the number of digits, where zeros will be used to fill the unused digits. To create hydrant IDs in the format <code>hyd_#####<\/code> where unused digits (the #s) are zeros, let\u2019s set the padding to 5.<\/li>\n<li><strong>Separator<\/strong> is an optional string value used to join the prefix, sequence, and suffix. We don\u2019t need one to meet our formatting requirements for hydrant IDs.<\/li>\n<li>The <strong>Add Another<\/strong> button at the bottom of the ID builder parameter, allows us to add multiple formatted IDs to our fire hydrant class. We might choose to do this, for example, to distinguish between various fire hydrant types (e.g., <code>hydTypeA_#####<\/code>, <code>hydType_#####<\/code>, etc.). For our example we&#8217;ll stick with just one ID.<\/li>\n<li>Each sequence can be previewed to help us validate the formatting we configured.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3><strong>Review and Modify the Generated Rule<\/strong><\/h3>\n<p>Click the <strong>OK<\/strong> button at the bottom of the tool to generate the template attribute rule. In the Attribute Rules Data Design View a new calculation rule appears called \u201cGenerateID\u201d. Rename the rule to \u201cSet Hydrant IDs\u201d.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2643092,"id":2643092,"title":"GenerateID_ARRuleName","filename":"GenerateID_ARRuleName.jpg","filesize":77248,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\/generateid_arrulename","alt":"","author":"365172","description":"","caption":"","name":"generateid_arrulename","status":"inherit","uploaded_to":2643142,"date":"2025-01-02 20:31:00","modified":"2025-02-11 18:14:05","menu_order":0,"mime_type":"image\/jpeg","type":"image","subtype":"jpeg","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1090,"height":266,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName-213x200.jpg","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","medium-width":464,"medium-height":113,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","medium_large-width":768,"medium_large-height":187,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","large-width":1090,"large-height":266,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","1536x1536-width":1090,"1536x1536-height":266,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","2048x2048-width":1090,"2048x2048-height":266,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName-826x202.jpg","card_image-width":826,"card_image-height":202,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_ARRuleName.jpg","wide_image-width":1090,"wide_image-height":266}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>If you scroll down to the script expression in the Details Pane, you can see the Arcade script that was generated. I&#8217;ve included the script in the collapsible below (note: it&#8217;s quite long!)<\/p>\n<details>\n<summary><strong>Click here to view Generate ID Attribute Rule Arcade script expression from ArcGIS Pro 3.4<\/strong><\/summary>\n<p>&nbsp;<\/p>\n<pre><code style=\"color: #24292e;background: #F5F5F5;padding: 1em\"><span style=\"color: #6a737d\">\/*\r\nwhere_clause (Text): A SQL Expression used to determine if the rule should continue(matches query), or return early\r\nseq_infos (Array): Array of sequence dictionaries\r\n  where_clause (Text): A SQL expression applied to $feature to identify the sequence to use\r\n  description (Text): A description of the sequence, this is for informational purposes and does not affect the execution\r\n  prefix (Text): A string place before the sequence value, can be an empty string\r\n  suffix (Text): A string placed after the sequence value, can be an empty string\r\n  padding (Text): Pads the sequence number to a given length, can be an empty string.  The format must such as '0000' for a 4 digit number such as 0005\r\n  sequence_key (Text): The key used in the get_sequence_value function to identify the sequence\r\n  separator (Text): A string used to join the prefix, sequence and suffice, can be an empty string\r\n  intersect_values (Dictionary): The parameters used to look up a value in an intersecting layer to get an ID to determine a unique sequence for rows\r\n    target_name (Text): The unqualified target class name\r\n    where_clause (Text): An optional sql expression to limit the results from the target class\r\n    spatial_operator (Text): The optional string for spatial filtering. Intersects\/Within.\r\n    search_distance (Number): The optional buffer distance to apply to spatial_operator.\r\n    search_units (Text): The optional units to apply to search_distance.\r\n\trow_id_field (Text): The field in the intersected class used to determine the sequence used\r\n\tid_values (Dictionary): A Dictionary where the keys are the values(as text) from the field in row_id_field in the intersected layers and the value is the key of the sequence to use\r\n*\/<\/span>\r\n<span style=\"color: #d73a49\">var<\/span> rule_settings = {\r\n  <span style=\"color: #032f62\">'where_clause'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n  <span style=\"color: #032f62\">'seq_infos'<\/span>: [\r\n    {\r\n      <span style=\"color: #032f62\">'where_clause'<\/span>: <span style=\"color: #032f62\">''<\/span>,\r\n      <span style=\"color: #032f62\">'description'<\/span>: <span style=\"color: #032f62\">'IDs for fire hydrants'<\/span>,\r\n      <span style=\"color: #032f62\">'prefix'<\/span>: <span style=\"color: #032f62\">'hyd_'<\/span>,\r\n      <span style=\"color: #032f62\">'suffix'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n      <span style=\"color: #032f62\">'padding'<\/span>: <span style=\"color: #032f62\">'00000'<\/span>,\r\n      <span style=\"color: #032f62\">'sequence_key'<\/span>: <span style=\"color: #032f62\">'HydrantIDs'<\/span>,\r\n      <span style=\"color: #032f62\">'separator'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n      <span style=\"color: #032f62\">'intersect_values'<\/span>: {\r\n        <span style=\"color: #032f62\">'target_name'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n        <span style=\"color: #032f62\">'where_clause'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n        <span style=\"color: #032f62\">'spatial_operator'<\/span>: <span style=\"color: #032f62\">'Intersects'<\/span>,\r\n        <span style=\"color: #032f62\">'search_distance'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n        <span style=\"color: #032f62\">'search_units'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n        <span style=\"color: #032f62\">'order_by_clause'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n        <span style=\"color: #032f62\">'row_id_field'<\/span>: <span style=\"color: #005cc5\">null<\/span>,\r\n        <span style=\"color: #032f62\">'id_values'<\/span>: {\r\n        },\r\n      },\r\n    },\r\n  ],\r\n};\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">get_sequence_value<\/span>(sequence_key) {\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Decode<\/span>(\r\n    sequence_key,\r\n    <span style=\"color: #032f62\">'HydrantIDs'<\/span>, <span style=\"color: #e36209\">NextSequenceValue<\/span>(<span style=\"color: #032f62\">'HydrantIDs'<\/span>),\r\n    <span style=\"color: #005cc5\">null<\/span>\r\n  );\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">get_feature_set<\/span>(key) {\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Decode<\/span>(\r\n    key,\r\n    <span style=\"color: #005cc5\">null<\/span>\r\n  );\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">IsEmpty2<\/span>(value) {\r\n  <span style=\"color: #d73a49\">var<\/span> type = <span style=\"color: #e36209\">TypeOf<\/span>(value);\r\n  <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">''<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">true<\/span>; <span style=\"color: #6a737d\">\/\/ null<\/span>\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Boolean'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> !value;\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'String'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">IsEmpty<\/span>(value);\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (\r\n    (type == <span style=\"color: #032f62\">'Array'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'Dictionary'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'FeatureSet'<\/span>)\r\n  ) {\r\n    <span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> x <span style=\"color: #d73a49\">in<\/span> value) {\r\n      <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">false<\/span>;\r\n    }\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">true<\/span>;\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Number'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">IsNan<\/span>(value);\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Point'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">IsNan<\/span>(value.x);\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Multipoint'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Count<\/span>(value.points) == <span style=\"color: #005cc5\">0<\/span>;\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Polyline'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Count<\/span>(value.paths) == <span style=\"color: #005cc5\">0<\/span>;\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Polygon'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Count<\/span>(value.rings) == <span style=\"color: #005cc5\">0<\/span>;\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (type == <span style=\"color: #032f62\">'Extent'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">IsNan<\/span>(value.xmin);\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (\r\n    (type == <span style=\"color: #032f62\">'Feature'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'DateOnly'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'Time'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'Date'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'FeatureSetCollection'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'Portal'<\/span>) ||\r\n    (type == <span style=\"color: #032f62\">'Function'<\/span>)\r\n  ) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">false<\/span>\r\n  }\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">null<\/span>;\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">features_to_featureset<\/span>(features) {\r\n  <span style=\"color: #6a737d\">\/\/ Converts features array to feature set.<\/span>\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">TypeOf<\/span>(features) == <span style=\"color: #032f62\">'FeatureSet'<\/span>) {\r\n    <span style=\"color: #d73a49\">return<\/span> features;\r\n  }\r\n  <span style=\"color: #d73a49\">var<\/span> rows = [];\r\n  <span style=\"color: #d73a49\">var<\/span> feat, feat_dict;\r\n  <span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> i <span style=\"color: #d73a49\">in<\/span> features) {\r\n    feat = features[i];\r\n    feat_dict = {\r\n      <span style=\"color: #032f62\">'__oid__'<\/span>: i + <span style=\"color: #005cc5\">1<\/span>, <span style=\"color: #6a737d\">\/\/ Incrementing OID field.<\/span>\r\n    };\r\n    <span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> j <span style=\"color: #d73a49\">in<\/span> feat) {\r\n      feat_dict[j] = feat[j];\r\n    }\r\n    <span style=\"color: #e36209\">Push<\/span>(rows, {\r\n      <span style=\"color: #032f62\">'attributes'<\/span>: feat_dict,\r\n    });\r\n  }\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(feat)) {\r\n    <span style=\"color: #d73a49\">return<\/span>;\r\n  }\r\n\r\n  <span style=\"color: #6a737d\">\/\/ Add OID field to schema.<\/span>\r\n  <span style=\"color: #d73a49\">var<\/span> feat_schema = <span style=\"color: #e36209\">Array<\/span>(<span style=\"color: #e36209\">Schema<\/span>(feat).fields);\r\n  <span style=\"color: #e36209\">Push<\/span>(feat_schema, {\r\n    <span style=\"color: #032f62\">'name'<\/span>: <span style=\"color: #032f62\">'__oid__'<\/span>,\r\n    <span style=\"color: #032f62\">'type'<\/span>: <span style=\"color: #032f62\">'esriFieldTypeInteger'<\/span>,\r\n  });\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">FeatureSet<\/span>({\r\n    <span style=\"color: #032f62\">'fields'<\/span>: feat_schema,\r\n    <span style=\"color: #032f62\">'features'<\/span>: rows,\r\n  });\r\n\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">count_features<\/span>(features, where_clause) {\r\n  <span style=\"color: #6a737d\">\/\/ count features that match where_clause<\/span>\r\n  <span style=\"color: #d73a49\">if<\/span> (IsEmpty2(features)) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">0<\/span>;\r\n  }\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(where_clause)) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Count<\/span>(features);\r\n  }\r\n  <span style=\"color: #d73a49\">var<\/span> fs = features_to_featureset(features);\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(fs)) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #005cc5\">0<\/span>;\r\n  }\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Count<\/span>(<span style=\"color: #e36209\">Filter<\/span>(fs, where_clause));\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">not_empty<\/span>(x) {\r\n  <span style=\"color: #d73a49\">return<\/span> !<span style=\"color: #e36209\">IsEmpty<\/span>(x);\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">get_unit_code<\/span>(unit) {\r\n  <span style=\"color: #6a737d\">\/\/ Converts unit string to unit code<\/span>\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(unit)) {\r\n    <span style=\"color: #d73a49\">return<\/span>\r\n  }\r\n\r\n  <span style=\"color: #d73a49\">var<\/span> u = <span style=\"color: #e36209\">Lower<\/span>(<span style=\"color: #e36209\">Replace<\/span>(<span style=\"color: #e36209\">Replace<\/span>(<span style=\"color: #e36209\">Replace<\/span>(unit, <span style=\"color: #032f62\">' '<\/span>, <span style=\"color: #032f62\">''<\/span>), <span style=\"color: #032f62\">'-'<\/span>, <span style=\"color: #032f62\">''<\/span>), <span style=\"color: #032f62\">'_'<\/span>, <span style=\"color: #032f62\">''<\/span>));\r\n  <span style=\"color: #6a737d\">\/\/ US \/ INT suffix differentiates the unit code. If no suffix, then it defaults to US Survey.<\/span>\r\n  <span style=\"color: #d73a49\">var<\/span> international = <span style=\"color: #005cc5\">false<\/span>;\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">Right<\/span>(u, <span style=\"color: #005cc5\">2<\/span>) == <span style=\"color: #032f62\">'us'<\/span>) {\r\n    u = <span style=\"color: #e36209\">Left<\/span>(u, <span style=\"color: #e36209\">Count<\/span>(u) - <span style=\"color: #005cc5\">2<\/span>);\r\n  } <span style=\"color: #d73a49\">else<\/span> <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">Right<\/span>(u, <span style=\"color: #005cc5\">3<\/span>) == <span style=\"color: #032f62\">'int'<\/span> &amp;&amp; u != <span style=\"color: #032f62\">'point'<\/span>) {\r\n    u = <span style=\"color: #e36209\">Left<\/span>(u, <span style=\"color: #e36209\">Count<\/span>(u) - <span style=\"color: #005cc5\">3<\/span>);\r\n    international = <span style=\"color: #005cc5\">true<\/span>;\r\n  }\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">Right<\/span>(u, <span style=\"color: #005cc5\">1<\/span>) == <span style=\"color: #032f62\">'s'<\/span> &amp;&amp; u != <span style=\"color: #032f62\">'inches'<\/span>) { <span style=\"color: #6a737d\">\/\/ plural<\/span>\r\n    u = <span style=\"color: #e36209\">Left<\/span>(u, <span style=\"color: #e36209\">Count<\/span>(u) - <span style=\"color: #005cc5\">1<\/span>);\r\n  }\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">When<\/span>(\r\n    <span style=\"color: #6a737d\">\/\/ Metric<\/span>\r\n    u == <span style=\"color: #032f62\">'km'<\/span> || u == <span style=\"color: #032f62\">'kilometer'<\/span>, <span style=\"color: #005cc5\">9036<\/span>,\r\n    u == <span style=\"color: #032f62\">'m'<\/span> || u == <span style=\"color: #032f62\">'meter'<\/span>, <span style=\"color: #005cc5\">9001<\/span>,\r\n    u == <span style=\"color: #032f62\">'dm'<\/span> || u == <span style=\"color: #032f62\">'decimeter'<\/span>, <span style=\"color: #005cc5\">109005<\/span>,\r\n    u == <span style=\"color: #032f62\">'cm'<\/span> || u == <span style=\"color: #032f62\">'centimeter'<\/span>, <span style=\"color: #005cc5\">1033<\/span>,\r\n    u == <span style=\"color: #032f62\">'mm'<\/span> || u == <span style=\"color: #032f62\">'millimeter'<\/span>, <span style=\"color: #005cc5\">1025<\/span>,\r\n\r\n    <span style=\"color: #6a737d\">\/\/ US Survey \/ International<\/span>\r\n    u == <span style=\"color: #032f62\">'nmi'<\/span> || u == <span style=\"color: #032f62\">'nauticalmile'<\/span>, <span style=\"color: #e36209\">IIf<\/span>(international, <span style=\"color: #005cc5\">9030<\/span>, <span style=\"color: #005cc5\">109012<\/span>),\r\n    u == <span style=\"color: #032f62\">'mi'<\/span> || u == <span style=\"color: #032f62\">'mile'<\/span>, <span style=\"color: #e36209\">IIf<\/span>(international, <span style=\"color: #005cc5\">9093<\/span>, <span style=\"color: #005cc5\">9035<\/span>),\r\n    u == <span style=\"color: #032f62\">'yd'<\/span> || u == <span style=\"color: #032f62\">'yard'<\/span>, <span style=\"color: #e36209\">IIf<\/span>(international, <span style=\"color: #005cc5\">9096<\/span>, <span style=\"color: #005cc5\">109002<\/span>),\r\n    u == <span style=\"color: #032f62\">'ft'<\/span> || u == <span style=\"color: #032f62\">'foot'<\/span> || u == <span style=\"color: #032f62\">'feet'<\/span>, <span style=\"color: #e36209\">IIf<\/span>(international, <span style=\"color: #005cc5\">9002<\/span>, <span style=\"color: #005cc5\">9003<\/span>),\r\n    u == <span style=\"color: #032f62\">'in'<\/span> || u == <span style=\"color: #032f62\">'inch'<\/span> || u == <span style=\"color: #032f62\">'inches'<\/span>, <span style=\"color: #e36209\">IIf<\/span>(international, <span style=\"color: #005cc5\">109008<\/span>, <span style=\"color: #005cc5\">109009<\/span>),\r\n\r\n    <span style=\"color: #6a737d\">\/\/ Misc<\/span>\r\n    u == <span style=\"color: #032f62\">'dd'<\/span> || u == <span style=\"color: #032f62\">'deg'<\/span> || u == <span style=\"color: #032f62\">'degree'<\/span> || u == <span style=\"color: #032f62\">'decimaldegree'<\/span>, <span style=\"color: #005cc5\">9102<\/span>,\r\n    u == <span style=\"color: #032f62\">'pt'<\/span> || u == <span style=\"color: #032f62\">'point'<\/span>, <span style=\"color: #005cc5\">109016<\/span>,\r\n\r\n    <span style=\"color: #6a737d\">\/\/ Default<\/span>\r\n    <span style=\"color: #005cc5\">null<\/span>,\r\n  )\r\n\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">pad_string<\/span>(val, pad) {\r\n  <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(pad) || <span style=\"color: #e36209\">IsEmpty<\/span>(val)) {\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Text<\/span>(val);\r\n  }\r\n  <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Right<\/span>(<span style=\"color: #e36209\">Text<\/span>(pad) + <span style=\"color: #e36209\">Text<\/span>(val), <span style=\"color: #e36209\">Max<\/span>([<span style=\"color: #e36209\">Count<\/span>(<span style=\"color: #e36209\">Text<\/span>(pad)), <span style=\"color: #e36209\">Count<\/span>(<span style=\"color: #e36209\">Text<\/span>(val))]));\r\n}\r\n\r\n<span style=\"color: #d73a49\">function<\/span> <span style=\"color: #6f42c1\">apply_sql_spatial_filter<\/span>(feature_set, options) {\r\n  <span style=\"color: #6a737d\">\/\/ Applies optional spatial\/attribute filters and OrderBy clause to feature_set.<\/span>\r\n  <span style=\"color: #d73a49\">var<\/span> spatialFilter = <span style=\"color: #e36209\">Decode<\/span>(\r\n    <span style=\"color: #e36209\">Lower<\/span>(<span style=\"color: #e36209\">DefaultValue<\/span>(options, <span style=\"color: #032f62\">'spatial_operator'<\/span>, <span style=\"color: #032f62\">''<\/span>)),\r\n    <span style=\"color: #032f62\">'intersects'<\/span>, <span style=\"color: #e36209\">Intersects<\/span>,\r\n    <span style=\"color: #032f62\">'contains'<\/span>, <span style=\"color: #e36209\">Contains<\/span>,\r\n    <span style=\"color: #032f62\">'crosses'<\/span>, <span style=\"color: #e36209\">Crosses<\/span>,\r\n    <span style=\"color: #032f62\">'envelopeintersects'<\/span>, <span style=\"color: #e36209\">EnvelopeIntersects<\/span>,\r\n    <span style=\"color: #032f62\">'intersects'<\/span>, <span style=\"color: #e36209\">Intersects<\/span>,\r\n    <span style=\"color: #032f62\">'overlaps'<\/span>, <span style=\"color: #e36209\">Overlaps<\/span>,\r\n    <span style=\"color: #032f62\">'touches'<\/span>, <span style=\"color: #e36209\">Touches<\/span>,\r\n    <span style=\"color: #032f62\">'within'<\/span>, <span style=\"color: #e36209\">Within<\/span>,\r\n    <span style=\"color: #005cc5\">null<\/span>\r\n  );\r\n\r\n  <span style=\"color: #d73a49\">var<\/span> geo = <span style=\"color: #e36209\">DefaultValue<\/span>(options, <span style=\"color: #032f62\">'input_geometry'<\/span>, <span style=\"color: #005cc5\">null<\/span>);\r\n  <span style=\"color: #d73a49\">if<\/span> (!<span style=\"color: #e36209\">IsEmpty<\/span>(spatialFilter) &amp;&amp; !IsEmpty2(geo)) {\r\n    <span style=\"color: #d73a49\">if<\/span> (!<span style=\"color: #e36209\">IsEmpty<\/span>(<span style=\"color: #e36209\">DefaultValue<\/span>(options, <span style=\"color: #032f62\">'search_distance'<\/span>, <span style=\"color: #005cc5\">null<\/span>))) {\r\n      geo = <span style=\"color: #e36209\">Buffer<\/span>(geo, options.search_distance, get_unit_code(options.search_units));\r\n    }\r\n    feature_set = spatialFilter(feature_set, geo);\r\n  }\r\n  <span style=\"color: #d73a49\">if<\/span> (!<span style=\"color: #e36209\">IsEmpty<\/span>(<span style=\"color: #e36209\">DefaultValue<\/span>(options, <span style=\"color: #032f62\">'where_clause'<\/span>, <span style=\"color: #005cc5\">null<\/span>))) {\r\n    feature_set = <span style=\"color: #e36209\">Filter<\/span>(feature_set, options.where_clause);\r\n  }\r\n  <span style=\"color: #d73a49\">if<\/span> (!<span style=\"color: #e36209\">IsEmpty<\/span>(<span style=\"color: #e36209\">DefaultValue<\/span>(options, <span style=\"color: #032f62\">'order_by_clause'<\/span>, <span style=\"color: #005cc5\">null<\/span>))) {\r\n    feature_set = <span style=\"color: #e36209\">OrderBy<\/span>(feature_set, options.order_by_clause);\r\n  }\r\n  <span style=\"color: #d73a49\">return<\/span> feature_set;\r\n}\r\n\r\n<span style=\"color: #d73a49\">if<\/span> (count_features([<span style=\"color: #e36209\">$feature<\/span>], <span style=\"color: #e36209\">DefaultValue<\/span>(rule_settings, <span style=\"color: #032f62\">'where_clause'<\/span>, <span style=\"color: #005cc5\">null<\/span>)) != <span style=\"color: #005cc5\">1<\/span>) {\r\n  <span style=\"color: #d73a49\">return<\/span>;\r\n}\r\n\r\n\r\n\r\n<span style=\"color: #e36209\">Expects<\/span>(<span style=\"color: #e36209\">$feature<\/span>, <span style=\"color: #032f62\">'HydrantID'<\/span>)\r\n\r\n<span style=\"color: #d73a49\">if<\/span> (!<span style=\"color: #e36209\">IsEmpty<\/span>(<span style=\"color: #e36209\">$feature<\/span>.HydrantID)) {\r\n  <span style=\"color: #d73a49\">return<\/span>;\r\n}\r\n\r\n<span style=\"color: #d73a49\">var<\/span> fs = features_to_featureset([<span style=\"color: #e36209\">$feature<\/span>]);\r\n<span style=\"color: #d73a49\">var<\/span> seq_val = <span style=\"color: #005cc5\">null<\/span>;\r\n<span style=\"color: #d73a49\">var<\/span> input_geometry = <span style=\"color: #e36209\">Geometry<\/span>(<span style=\"color: #e36209\">$feature<\/span>);\r\n<span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> i <span style=\"color: #d73a49\">in<\/span> rule_settings.seq_infos) {\r\n  <span style=\"color: #d73a49\">var<\/span> seq = rule_settings.seq_infos[i];\r\n  <span style=\"color: #d73a49\">if<\/span> (count_features(fs, seq.where_clause) == <span style=\"color: #005cc5\">1<\/span>) {\r\n    <span style=\"color: #d73a49\">var<\/span> seq_val = <span style=\"color: #005cc5\">null<\/span>;\r\n    <span style=\"color: #6a737d\">\/\/ If there are intersect lookup details, get the sequence key by intersecting the layer, if not, use<\/span>\r\n    <span style=\"color: #d73a49\">if<\/span> (!IsEmpty2(<span style=\"color: #e36209\">DefaultValue<\/span>(seq, [<span style=\"color: #032f62\">'intersect_values'<\/span>, <span style=\"color: #032f62\">'id_values'<\/span>], {}))) {\r\n      <span style=\"color: #6a737d\">\/\/ Convert the key to the featureset<\/span>\r\n      seq.intersect_values.input_geometry = input_geometry;\r\n      <span style=\"color: #d73a49\">var<\/span> intersect_fs = apply_sql_spatial_filter(get_feature_set(seq.intersect_values.target_name), seq.intersect_values);\r\n      <span style=\"color: #d73a49\">for<\/span> (<span style=\"color: #d73a49\">var<\/span> feat <span style=\"color: #d73a49\">in<\/span> intersect_fs) {\r\n        <span style=\"color: #d73a49\">var<\/span> row_id = <span style=\"color: #e36209\">Text<\/span>(feat[seq.intersect_values.row_id_field]);\r\n        <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">HasKey<\/span>(seq.intersect_values.id_values, row_id)) {\r\n          seq_val = get_sequence_value(seq.intersect_values.id_values[row_id]);\r\n          <span style=\"color: #d73a49\">if<\/span> (!<span style=\"color: #e36209\">IsEmpty<\/span>(seq_val)) {\r\n            <span style=\"color: #d73a49\">break<\/span>;\r\n          }\r\n        }\r\n      }\r\n    }\r\n    <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(seq_val) &amp;&amp; !IsEmpty2(seq.sequence_key)) {\r\n      seq_val = get_sequence_value(seq.sequence_key);\r\n    }\r\n    <span style=\"color: #6a737d\">\/\/ Check if seq was found<\/span>\r\n    <span style=\"color: #d73a49\">if<\/span> (<span style=\"color: #e36209\">IsEmpty<\/span>(seq_val)) {\r\n      <span style=\"color: #d73a49\">continue<\/span>;\r\n    }\r\n    <span style=\"color: #d73a49\">return<\/span> <span style=\"color: #e36209\">Concatenate<\/span>(<span style=\"color: #e36209\">Filter<\/span>([seq.prefix, pad_string(seq_val, seq.padding), seq.suffix], not_empty), seq.separator);\r\n  }\r\n}\r\n<span style=\"color: #d73a49\">return<\/span>;\r\n<\/code><\/pre>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<p>Once the attribute rule is saved, click the map and on the edit tab click the <strong>Create<\/strong> button. Add a few fire hydrant points.<\/p>\n<p>In the <strong>Contents<\/strong> pane, right click on the <em>Fire Hydrants<\/em> layer and open the <strong>Attributes table<\/strong>. You&#8217;ll see that the HydrantID values\u00a0 for the features we added follow the <code>hyd_#####<\/code> format exactly as we configured in the tool!<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2643402,"id":2643402,"title":"FireHydrants_AttributesTable","filename":"FireHydrants_AttributesTable-1.jpg","filesize":108506,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\/firehydrants_attributestable-2","alt":"","author":"365172","description":"","caption":"","name":"firehydrants_attributestable-2","status":"inherit","uploaded_to":2643142,"date":"2025-01-03 01:48:08","modified":"2025-01-03 01:48:08","menu_order":0,"mime_type":"image\/jpeg","type":"image","subtype":"jpeg","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":676,"height":341,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1-213x200.jpg","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","medium-width":464,"medium-height":234,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","medium_large-width":676,"medium_large-height":341,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","large-width":676,"large-height":341,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","1536x1536-width":676,"1536x1536-height":341,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","2048x2048-width":676,"2048x2048-height":341,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","card_image-width":676,"card_image-height":341,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/FireHydrants_AttributesTable-1.jpg","wide_image-width":676,"wide_image-height":341}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2><strong>Conclusion<\/strong><\/h2>\n<p>The Generate ID template rule brings one of the most used attribute rules into an easy to use, wizard-like experience. With just a few clicks you can add custom-formatted IDs to your features. And all with no prior knowledge of Arcade needed to use it.<\/p>\n<p>We\u2019d love to hear your feedback regarding the Generate Symbol Rotation template attribute rule! We encourage you to share your thoughts about it or any other attribute rule and data management topics that come to mind on the\u00a0<strong>ArcGIS Ideas<\/strong>\u00a0page!<\/p>\n"},{"acf_fc_layout":"content","content":"<h2><strong>FAQs<\/strong><\/h2>\n<p><strong>Do I need a specific ArcGIS Pro license level to generate template attribute rules?\u00a0<\/strong><\/p>\n<p>Yes, you will need either an ArcGIS Pro Standard or Advanced license level to utilize template attribute rules.<\/p>\n<p><strong>What are the differences between generating a template attribute rule from the Attribute Rules Data Design view versus from the Geoprocessing pane?<\/strong><\/p>\n<p>If you generate a template attribute rule from the Attribute Rule Data Design view for a particular feature class, the rule is added <em>directly<\/em> to the grid in the design view. Prior to saving the rule, you may make edits to the rule via the Details pane.<\/p>\n<p>On the other hand, if you use the template attribute rule geoprocessing tool, you must <em>import<\/em> the .csv file of the attribute rule generated by the tool to the class you specified in the Input Table parameter. The .csv file containing the attribute rule is stored in the path specified in the <strong>Output Folder<\/strong> parameter.<\/p>\n<p><strong>What are the differences between Attribute Rule Templates and Ready to Use Rules?<\/strong><\/p>\n<p>Template attribute rules can be used to generate <strong>Calculation<\/strong> rules using geoprocessing tools. After generating a template attribute rule a user can modify the Arcade script associated with it and any other attribute rule properties via the Details pane.<\/p>\n<p>Ready to Use Rules require a Data Reviewer license. They can be used to generate <strong>Constraint<\/strong> and <strong>Validation <\/strong>reviewer rules from directly within the Attribute Rules Data Design view. Reviewer rules are used to detect features that do not comply with established data quality requirements defined by your organization. To learn more about reviewer rules please visit <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/validating-data\/manage-reviewer-rules-in-a-geodatabase.htm\">Manage reviewer rules in a geodatabase<\/a>.<\/p>\n<p><strong>Where can I learn more about Generate ID template attribute rules?<\/strong><\/p>\n<p>The following online help documents are useful in more about Generate ID template attribute rules:<\/p>\n<ul>\n<li><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/data\/geodatabases\/overview\/template-attribute-rules.htm#ESRI_SECTION1_8996DBA84B4949F8A3EEA2FE6E477745\">Template attribute rules \u2013 Generate ID<\/a><\/li>\n<li><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/data-management\/generate-id-attribute-rule.htm\">Generate ID Attribute Rule Geoprocessing Tool<\/a><\/li>\n<\/ul>\n"}],"related_articles":[{"ID":2642652,"post_author":"365172","post_date":"2025-04-07 15:35:17","post_date_gmt":"2025-04-07 22:35:17","post_content":"","post_title":"Template Attribute Rules - Generate Spatial Join","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"attribute-rules-generate-spatial-join","to_ping":"","pinged":"","post_modified":"2025-09-25 10:17:18","post_modified_gmt":"2025-09-25 17:17:18","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2642652","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":2642312,"post_author":"365172","post_date":"2025-01-14 12:44:28","post_date_gmt":"2025-01-14 20:44:28","post_content":"","post_title":"Template Attribute Rules - Generate Symbol Rotation","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"attribute-rules-generate-symbol-rotation","to_ping":"","pinged":"","post_modified":"2025-09-25 10:26:16","post_modified_gmt":"2025-09-25 17:26:16","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2642312","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"show_article_image":false,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/GenerateID_CoverPhoto.jpg","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>Template Attribute Rules - Generate ID<\/title>\n<meta name=\"description\" content=\"Generate ID template attribute rules allow you to auto generate IDs for features while editing.\" \/>\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\/attribute-rules-generate-id\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Template Attribute Rules - Generate ID\" \/>\n<meta property=\"og:description\" content=\"Generate ID template attribute rules allow you to auto generate IDs for features while editing.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\" \/>\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-09-25T17:12:01+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=\"10 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\/attribute-rules-generate-id#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\"},\"author\":{\"name\":\"Mihail Kaburis\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/3db9f2b407fc4699dd0b4570bea12d36\"},\"headline\":\"Template Attribute Rules &#8211; Generate ID\",\"datePublished\":\"2025-01-14T20:42:19+00:00\",\"dateModified\":\"2025-09-25T17:12:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"ArcGIS Pro\",\"attribute rules\",\"data management\",\"geodatabase\",\"Template Attribute Rules\"],\"articleSection\":[\"Data Management\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\",\"name\":\"Template Attribute Rules - Generate ID\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2025-01-14T20:42:19+00:00\",\"dateModified\":\"2025-09-25T17:12:01+00:00\",\"description\":\"Generate ID template attribute rules allow you to auto generate IDs for features while editing.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Template Attribute Rules &#8211; Generate ID\"}]},{\"@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\/3db9f2b407fc4699dd0b4570bea12d36\",\"name\":\"Mihail Kaburis\",\"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\/2025\/01\/uc_2024_profile_stamford-468x465.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/uc_2024_profile_stamford-468x465.jpg\",\"caption\":\"Mihail Kaburis\"},\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/mkaburis\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Template Attribute Rules - Generate ID","description":"Generate ID template attribute rules allow you to auto generate IDs for features while editing.","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\/attribute-rules-generate-id","og_locale":"en_US","og_type":"article","og_title":"Template Attribute Rules - Generate ID","og_description":"Generate ID template attribute rules allow you to auto generate IDs for features while editing.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2025-09-25T17:12:01+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","twitter_misc":{"Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id"},"author":{"name":"Mihail Kaburis","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/3db9f2b407fc4699dd0b4570bea12d36"},"headline":"Template Attribute Rules &#8211; Generate ID","datePublished":"2025-01-14T20:42:19+00:00","dateModified":"2025-09-25T17:12:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id"},"wordCount":6,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["ArcGIS Pro","attribute rules","data management","geodatabase","Template Attribute Rules"],"articleSection":["Data Management"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id","name":"Template Attribute Rules - Generate ID","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2025-01-14T20:42:19+00:00","dateModified":"2025-09-25T17:12:01+00:00","description":"Generate ID template attribute rules allow you to auto generate IDs for features while editing.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/attribute-rules-generate-id#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Template Attribute Rules &#8211; Generate ID"}]},{"@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\/3db9f2b407fc4699dd0b4570bea12d36","name":"Mihail Kaburis","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\/2025\/01\/uc_2024_profile_stamford-468x465.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/uc_2024_profile_stamford-468x465.jpg","caption":"Mihail Kaburis"},"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/mkaburis"}]}},"text_date":"January 14, 2025","author_name":"Mihail Kaburis","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/mkaburis","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":42181,"name":"ArcGIS Pro","slug":"arcgis-pro","term_group":0,"term_taxonomy_id":42181,"taxonomy":"post_tag","description":"","parent":0,"count":323,"filter":"raw"},{"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"},{"term_id":86442,"name":"data management","slug":"data-management","term_group":0,"term_taxonomy_id":86442,"taxonomy":"post_tag","description":"","parent":0,"count":67,"filter":"raw"},{"term_id":25381,"name":"geodatabase","slug":"geodatabase","term_group":0,"term_taxonomy_id":25381,"taxonomy":"post_tag","description":"","parent":0,"count":48,"filter":"raw"},{"term_id":777832,"name":"Template Attribute Rules","slug":"template-attribute-rules","term_group":0,"term_taxonomy_id":777832,"taxonomy":"post_tag","description":"","parent":0,"count":3,"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":920,"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":2036,"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\/2643142","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\/365172"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2643142"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2643142\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2643142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2643142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2643142"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2643142"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2643142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}