Yes Please!
Being able to import fields and domains is great. However, manually adding field aliases, and the choice lists for all of the domains seems like a solvable problem that would save everyone so much time!
@DanielO_Donnell1 's recommendation is perfect.
Using the Alter Fields (multiple) tool allows users to pass any number of class / field_name / alias combinations programmatically into ArcGIS Pro using a little bit of Python.
For more information on the Alter Fields (multiple) tool check out the documentation linked below.
https://pro.arcgis.com/en/pro-app/3.4/tool-reference/data-management/alter-fields.htm
In the example below a stand alone table with columns 'field_name' and 'field_alias' is used to update the alias of each named field in a given class.
import arcpy
target_class = << path to target >>
alias_table = << path to alias table >>
field_updates = []
with arcpy.da.SearchCursor(alias_table, ['field_name', 'field_alias']) as cursor:
for row in cursor:
name, alias = row
field_updates.append([name, "", alias])
arcpy.management.AlterFields(
target_class,
field_updates
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.