HOW TO

Set up related tables in ArcGIS Pro for use in ArcGIS Field Maps

Last Published: August 18, 2022

Summary

Creating a related table in ArcGIS Pro requires unique values to represent the relationship between the primary key and foreign key. It is recommended to use the GlobalID field of the layer so the primary key of the relationship is unique when establishing a connection between a feature class and a table.

The most convenient way to achieve this is through Global IDs and globally unique identifiers (GUIDs). Both data types store registry-style strings comprising 36 characters enclosed in curly brackets, for example, {90A942E1-BC7C-4F1E-94D5-AACAAD24F08C}.

One of the differences between Global IDs and GUIDs is ArcGIS actively maintains Global ID fields (that is, when a new feature is created, a GUID value is assigned), whereas GUID fields are left blank and the user must maintain these fields.

To use related tables in a relationship class, the Global IDs in the origin table can be used as the primary key, and the GUIDs in the destination table can be used as the foreign key. Using this method, ArcGIS automatically copies the primary key (Global ID) into the foreign key (GUID) field.

The following workflow demonstrates how to set up standalone tables for use in ArcGIS Field Maps by adding Global IDs in ArcGIS Pro. In this example, a relationship is created between the feature class, Schools_all, and the standalone table, LightRailStopsTable.

Procedure

  1. Set up the feature class with the desired fields. Refer to ArcGIS Pro: Open the map and add your data.
  2. Set up the standalone table with the desired fields. Refer to ArcGIS Pro: Add and open a stand-alone or attribute table from a map or scene.
  3. Add the Global ID field to the attribute table of the feature class using the Add Global IDs tool.
    1. In the Contents pane, right-click the feature class and click Attribute Table. This opens the attribute table view.
    2. On the top ribbon, click the Analysis tab > Tools.
    3. In the Geoprocessing pane, search for and select Add Global IDs (Data Management Tools).
Geoprocessing pane to search for the Add Global IDs tool
  1. In the Add Global IDs pane, for Input Datasets, click the drop-down arrow or Browse, select the feature class, and click Run. The Global ID field is added to the feature class’s attribute table.
Drop-down of Input Datasets in Add Global ID pane
  1. Add a GUID field to the standalone table.
    1. In the Contents pane, right-click the table and click Open.
Open button option to open attribute table
  1. In the attribute table view, click the Add icon to add a field.
Add button to add field in an attribute table
  1. In the Fields view, in the Field Name column, type the name for the new field.
Space to key-in the new field name under Field Name column
  1. Under the Data Type column, double-click the cell to open the drop-down menu and click Guid.
Choose Guid drop-down option under the Data Type column for the new field
  1. On the Fields tab, in the Changes group, click Save.
Save button in the Changes group
  1. Exit the fields view. The new field is displayed in the table.
  1. Relate the feature class to the table. Refer to How To: Relate attributes from one layer to another layer or table in ArcGIS Pro for more information.
  2. Create a relationship class between the feature class and the table using the Create Relationship Class tool.
    1. On the top ribbon, click the Analysis tab > Tools.
    2. In the Geoprocessing pane, search for and select Create Relationship Class (Data Management Tools).
    3. In the Create Relationship Class pane, for Origin Table, click the drop-down arrow or Browse and select the feature class.
Drop-down button or browse file button for Origin Table section in the Create Relationship Class pane
  1. For Destination Table, click the drop-down arrow or Browse and select the table.
Drop-down button or browse file button for Destination Table section in the Create Relationship Class pane
  1. Click the drop-down arrow for Cardinality and select the relevant option. Refer to ArcGIS Pro: Cardinality for more information.
  2. Click the drop-down arrow for the Origin Primary Key and select the GlobalID option.
Drop-down menu of the Origin Primary Key to select the GlobalID option in the Create Relationship Class pane
  1. Click the drop-down arrow for Origin Foreign Key and select the GUID option. In this example, the origin foreign key is SchoolsID.
Drop-down menu of the Origin Foreign Key to select the GUID option in the Create Relationship Class pane
  1. Leave the other parameters as default and click Run.
  2. Exit the Geoprocessing pane. The relationship class geodatabase appears in the Catalog pane.

Article ID:000028010

Software:
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options