操作方法

操作方法:在 ArcGIS Pro 中合并字符串和 ObjectID 字段

Last Published: December 15, 2023

摘要

In ArcGIS Pro, the Field Calculator tool can merge two or more text fields to create a new field with the merged field attributes. This may be done to improve readability of the field values, or for data uniformity, if two or more fields must be combined.

The instructions provided describe how to use the Field Calculator in ArcGIS Pro to merge the string and ObjectID fields in the attribute table. The OBJECTID and NAME fields in the attribute table are merged in this example.

Nbo_Hood_Clip attribute table in ArcGIS Pro

过程

  1. Start ArcGIS Pro and open the project.
  2. In the Contents pane, right-click the feature layer, and click Attribute Table to open the feature layer attribute table.
ArcGIS Pro Contents pane
  1. In the feature layer attribute table pane, click Calculate to open the Calculate Field dialog box.
The Nbo_Hood_Clip attribute table
  1. In the Calculate Field dialog box, configure the following parameters:
    1. For Input Table, select the feature layer.
    2. For Field Name (Existing or New), select the available field to update the existing field for the merged fields. Alternatively, create a new merged field name.
    3. If a new field is created, for Field Type, select the preferred field type. Refer to ArcGIS Pro: ArcGIS field data types for more information.
    4. For Expression Type, select Python 3.
    5. For the Expression section, merge the string and the OBJECTID field in the attribute table using the following expression:
!<FieldName>! + " - " + str(!OBJECTID!)
Note:
Refer to ArcGIS Pro: Calculate Field Python examples for further information on Python expressions.
  1. Click OK.
The ArcGIS Pro Calculate Field dialog box

文章 ID: 000026481

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项