Generate ID Attribute Rule (Data Management Tools)
Summary
Creates an attribute rule that generates a unique value for a field from a query.
The tool creates a .csv file containing an ArcGIS Arcade attribute rule based on the inputs provided, a Python file that contains the code for generating sequences in the workspace, and an ID file for visualizing generated IDs.
Usage
The Output Folder parameter specifies the location where a folder will be created using the name of the input feature class. The output
.csvfile containing the attribute rule will use the name of the Input Table parameter value. If the tool is run multiple times, additional.csvfiles will be created in the folder.After the tool runs, import the attribute rule and apply it to the dataset. If the dataset is in an enterprise geodatabase, you must be the data owner to apply the output template attribute rule.
When setting the ID Builder parameter's Sequence by lookup value, a database sequence will be generated for each distinct value in the intersecting dataset's
Sequence by lookupfield that is present at the time the attribute rule is created. Features created after the rule has been written will need to be manually included.If an ID is required for a target feature, configure the ID field to disallow nulls.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Table |
The dataset that the new rule will be applied to. |
Table View |
|
Output Folder |
The folder where the output |
Folder |
|
Field |
The name of the existing field the rule will be applied to. |
Field |
|
Expression (Optional) |
An SQL expression that limits the rows that the attribute rule will be applied to. |
SQL Expression |
|
Create Sequences (Optional) |
Specifies whether database sequences will be created in the specified workspace.
|
Boolean |
|
Definition Type (Optional) |
Specifies the method that will be used to define the format of the ID.
|
String |
|
ID Builder (Optional) |
A set of format options that will define the attribute rule. This includes an SQL expression that will be used to apply different formats and sequences per asset, as well as padding, prefix, and suffix values. A preview of the string will display in the Geoprocessing pane from the values entered in the format options. Value table columns:
|
Value Table |
|
ID Definition Table (Optional) |
A table or record set that defines the ID format. This includes the SQL expression that will be used to apply different formats and sequences per asset, as well as padding, prefix, and suffix values. The table must include the following fields:
|
Record Set |
|
Coded Value Fields (Optional) |
The fields that will be used to generate an SQL expression and configuration for an ID. |
Field |
|
Sequence By Intersect (Optional) |
The features from the intersecting dataset that will be used to generate unique ID values in the input features. The optional field value from the intersecting dataset will be used for the sequence by lookup value. Value table columns:
|
Value Table |
Derived output
| Label | Explanation | Data type |
|---|---|---|
|
Output Rule CSV |
The output |
File |
|
ID Definition Table |
A table of the sequence definition configurations. This file can be edited and reused by the tool using the Definition Type parameter's Table option. |
File |
|
Python Sequence Script |
The output Python sequence file. The file can be used in other workspaces or by anyone with permissions to create database sequences. |
File |
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes