HOW TO

Export and import an Arcade script for an attribute table in ArcGIS Pro

Last Published: November 28, 2023

Summary

Custom expressions written in Arcade can be used to populate or modify fields of an attribute table in ArcGIS Pro. These expressions can be shared within an organization by exporting and importing them as a Calculate Field Expression (CAL) file. This article provides the steps to export and import custom expressions in ArcGIS Pro. In this example, a new field (Species_General_Name_Expression) is added to the attribute table using the Species_Code field as a reference to display the general name of the fish species for each point symbol.

Procedure

Export an Arcade expression

  1. Start ArcGIS Pro and open the project.
  2. In the Contents pane, right-click the feature class and click Attribute Table to open the attribute table of the feature class.
  3. Click Calculate to open the Calculate Field tool.
Note:
Refer to ArcGIS Pro: Calculate Field (Data Management) for more information on the parameters in the Calculate Field tool.
  1. In the Calculate Field dialog box, below the Expression dialog box, click Export The Export icon to export the Arcade expression.
  2. Navigate to the desired folder and click Save.
The Calculate Field and Export dialog box

Import an Arcade expression

  1. Start ArcGIS Pro and open the project.
  2. In the Contents pane, right-click the feature class and click Attribute Table to open the attribute table of the feature class.
  3. Click Calculate to open the Calculate Field tool.
  4. In the Calculate Field dialog box, configure the parameters.
    1. For Input Table, select the feature class. In this example, FishObservations is selected.
    2. For Field Name (Existing or New), select the field to be edited or create a new field. In this example, the Species General Name Expression field is created.
    3. For Field Type, select Text.
    4. For Expression Type, select Arcade.
    5. Below the Expression dialog box, click Import The Import icon .
    6. Navigate to and select the Calculate Field Expression (CAL) file. Click OK.
The Calculate Field and Import dialog box
  1. Click Verify to run a test of the expression. If the expression is valid, click OK.
The Calculate Field dialog box

The image below shows the newly created Species General Name Expression field in the attribute table.

The attribute table

Article ID: 000031514

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 3 2

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

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options