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
- Start ArcGIS Pro and open the project.
- In the Contents pane, right-click the feature class and click Attribute Table to open the attribute table of the feature class.
- 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.
- In the Calculate Field dialog box, below the Expression dialog box, click Export to export the Arcade expression.
- Navigate to the desired folder and click Save.
Import an Arcade expression
- Start ArcGIS Pro and open the project.
- In the Contents pane, right-click the feature class and click Attribute Table to open the attribute table of the feature class.
- Click Calculate to open the Calculate Field tool.
- In the Calculate Field dialog box, configure the parameters.
- For Input Table, select the feature class. In this example, FishObservations is selected.
- 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.
- For Field Type, select Text.
- For Expression Type, select Arcade.
- Below the Expression dialog box, click Import .
- Navigate to and select the Calculate Field Expression (CAL) file. Click OK.
- Click Verify to run a test of the expression. If the expression is valid, click OK.
The image below shows the newly created Species General Name Expression field in the attribute table.