Description
In ArcGIS Online or Portal for ArcGIS, shapefiles can be added as an item to create a hosted feature layer. However, the resulting feature layer does not have field aliases preserved, and both the field and display names are identical.
In this example, the shapefile is created in ArcGIS Pro with different field names and field aliases. However, when the shapefile is added to ArcGIS Online, the feature layer’s display names follow the field names instead of the field aliases.
Cause
This behavior is a known limitation for shapefiles. They make use of the dBASE file format (.dbf file) to store attributes, which does not include field aliases, unlike geodatabases. Shapefiles can have aliases when referenced within a map document or layer file, but not as a stand-alone file or when shared without a layer file. Refer to ArcGIS Pro: Geoprocessing considerations for shapefile output for more information.
Solution or Workaround
Configure the shapefile’s layer pop-ups in ArcGIS Pro
- Open ArcGIS Pro and add the shapefile to the project.
- Modify the shapefile layer's field aliases using the Configure Pop-ups pane.
- In the Contents pane, right-click the shapefile layer and click Configure Pop-ups.
- In the Configure Pop-ups pane, click Edit pop-up element .
- In the Fields Options pane, uncheck Only use visible fields and Arcade expressions.
- Hover over a field in the table and click Format the field to modify the field alias.
- In the Pop-up Field Formatting pane, specify the field alias for Display Label and click Back .
- Modify the remaining field aliases as required.
- In the Contents pane, right-click the shapefile layer and click Sharing > Share As Web Layer to share the shapefile layer as a web layer in ArcGIS Online or Portal for ArcGIS. Refer to ArcGIS Pro: Share a web feature layer for instructions.
Note:
If the Share As Web Layer option is unavailable, close the shapefile layer's fields view.
The image below shows the field aliases of the hosted feature layer preserved in ArcGIS Online.
Modify the shapefile layer's field aliases using the fields view in ArcGIS Pro
- Open ArcGIS Pro.
- Add the shapefile to the project and open the fields view.
- In the fields view table, double-click the field under the Alias column and edit the alias.
- Repeat Step 3 to modify the remaining aliases as required and click Save on the top ribbon.
- In the fields view, click Close .
- In the Contents pane, right-click the shapefile layer and click Sharing > Share As Web Layer to share the shapefile layer as a web layer in ArcGIS Online or Portal for ArcGIS. Refer to ArcGIS Pro: Share a web feature layer for instructions.
The image below shows the field aliases of the hosted feature layer preserved in ArcGIS Online.