When running Make Feature Layer in ArcGIS Pro, how can field names be changed? This was possible in ArcMap. Also it appears that using arcpy.MakeFeatureLayer_management with field infos to change the field names does not work.
ArcMap: Can change field name
Pro: Can't....
Arcmap help explicitly states "Field names can be given a new name by using the Field Info control. The second column on the control lists the existing field names from the input. To rename a field, click the field name and type in a new one."
While Pro help, this text is not present.
Thanks for the clarification.
I don't understand why this would change in Pro. Especially when many of us have developed workflows and scripts that assume things will behave this way. I suppose I'll have to re-write everything to use FeatureClassToFeatureClass instead .
You can always change them later
to future users who find this thread...
I need this functionality to clean up field names after joins and to add a prefix to identify sources. This is very frustrating that this has not been addressed 7 years later.
I thought I'd work around the FL limitation by changing the field names in the table view before my join. After all, the FieldInfo and MakeTableView documentation explicitly state that changing field names can be done (even in the MTV examples!?!?) - but alas it does not work.
Even if it did, I'd still be stuck dealing with absurdly long field names like schema_name.really_long_table_name.potentially_long_field_name which is clearly difficult to work with.
So instead of Make layers \ join \ field info \ export to destination FGDB, I'll now have to Make layers \ join \ export to scratch \ build an output FC shell in the destination FGDB \ create a field map \ and append.
And I tried Dan's Alter Field recommendation, but it failed on "required" fields even though none of my fields are set as required.