Add Relate (Data Management Tools)
Summary
Relates a layer to another layer or table based on a field value. Feature layers, table views, subtype value layers or tables, and raster layers with a raster attribute table are supported.
The records in the Relate Table parameter value are matched to the records in the input Layer Name or Table View parameter value. A match occurs when a field value in the Input Relate Field parameter value and a field value in the Output Relate Field parameter value are equal.
Usage
If the input is a feature class or dataset path, this tool will create and return a new layer with the result of the tool applied.
A relate does not modify data; a relate is a property of the layer or table view.
Records from the relate table can be matched to more than one record in the input layer or table view.
The relate table can be a geodatabase table or a dBASE file. The relate table does not have to be a layer.
The input must have an Object ID field. The relate table is not required to contain an Object ID field.
To save the relate for use in another project, save the layer to a layer file using the Save Layer To File tool. This only applies to layers; table views cannot be saved in this manner.
To make a permanent relate, use the Create Relationship Class tool.
Indexing the fields in the input layer or table view and the relate table on which the relate will be based can improve performance. This can be done with the Add Attribute Index tool.
When the input layer has a relationship and the Automatically select related data property is checked, a selection on the input layer will also select records in the related table.
When there is another layer or standalone table in the map that shares the same data source as the layer or table specified in the Relate Table parameter, no additional relates are established between these other layers or tables.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Layer Name or Table View |
The layer or table view to which the relate table will be related. |
Mosaic Layer; Raster Layer; Table View |
|
Input Relate Field |
The primary key field in the input layer or table view on which the relate will be based. |
Field |
|
Relate Table |
The table or table view to be related to the input layer or table view. |
Mosaic Layer; Raster Layer; Table View |
|
Output Relate Field |
The foreign key field in the relate table that will be used to match the primary key. |
Field |
|
Relate Name |
The unique name of a relate. |
String |
|
Cardinality (Optional) |
Specifies the cardinality of the relationship.
|
String |
Derived output
| Label | Explanation | Data type |
|---|---|---|
|
Updated Input Layer or Table View |
The updated input dataset. |
Table View; Raster Layer; Mosaic Layer |
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes