Select to view content in your preferred language

Why does ArcGIS Pro disagree with the official spec on Field Name Length?

5958
5
Jump to solution
12-01-2021 12:41 PM
alex_friant
Frequent Contributor

In ArcGIS Pro, if you try to create a field name with a length of more than 32 characters (say by importing an existing Feature Class as a template) the tool gives a red box error indicator, and the hover text states:

  • A field name cannot exceed 32 characters

alex_friant_1-1638390467411.png

That's great, except the official ArcGIS Pro specs on File Geodatabases says that a field name length can be up to 64 characters long:

  • File name length - 64 characters

alex_friant_2-1638390542380.png

I can confirm that it's possible to have file geodatabase field names longer than 32 characters as I have a file geodatabase that has a feature class with a 36 character field name which was generated using the ArcGIS Python API from a spatially enabled dataframe:

alex_friant_3-1638390961060.png

My question is why is there a disagreement here between the actual specs and the software? Is this just an oversight? It seems like it is, otherwise the spec should say the limit is 32 characters. 

If it is an oversight, can we get the ArcGIS Pro team to include this in a future update patch?

 

2 Solutions

Accepted Solutions
KoryKramer
Esri Community Moderator

I believe you're probably seeing this bug (BUG-000106643)  https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNjY0Mw== 

The stated alternate solution is "Use the Add Field tool in ArcGIS Pro or ArcMap to create a field with a longer field name" which seems to match up with your observation that the database itself can handle the length, but the problem appears to be in the Fields View. 

Please go to the bug on the support site and use the Subscribe button to set up notifications as well as increment the count which is important to help teams prioritize.

Thank you

View solution in original post

Joey_Lecky
Occasional Contributor

Update:

I updated to Pro 3.5.2 and it seems this issue has been resolved.  The 'Create Feature Class' wizard(?), the 'Fields View', and 'Alter Field(s)' tools all appear to be able to handle field names up to 128 characters and will truncate longer field names to 128. 

 

Although, (this is a little off topic from the original post now) I'm seeing a bug in the 'Alter Fields (multiple)' tool that I'm pretty sure was not there previously. For any/all fields it attempts to set the "New Field Type" parameter to 'Long' regardless of what the input field type is. And even though it says "New Field Type" is an optional parameter, it does not allow you to leave it blank. You can delete it but it instantly just repopulates with "Long (32-bit integer)". So in order to run the tool successfully you have to manually check what the input field type is an specify it or else the tool will return an error (ERROR 001658), or if run on an empty featureclass/table you may inadvertently change all fields to Long integer type. For text fields, the problem is worse because after setting the type to Text it will insist the 'New Field Length' parameter is 255, regardless of what the input fields length is - so you have to manually look up and enter a number equal to or greater than the current field's length, and there is the same issue of not being able to leave it blank even though it's supposed to be optional. 

In contrast the 'Alter Field' (singular) tool does not even have a parameter for 'New Field Type' (unless the 'input table' is empty and then it appears), but it correctly knows what type the input field is and will persist that field type by default. And similarly, if a text field is selected it correctly populates the current field length. This tool sets the user up for success. The 'Alter Fields (multiple)' tool currently sets the user up for failure and errors.

View solution in original post

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

I will flag @KoryKramer  for follow up in case it is a documentation or something the Pro team can address.


... sort of retired...
0 Kudos
KoryKramer
Esri Community Moderator

I believe you're probably seeing this bug (BUG-000106643)  https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNjY0Mw== 

The stated alternate solution is "Use the Add Field tool in ArcGIS Pro or ArcMap to create a field with a longer field name" which seems to match up with your observation that the database itself can handle the length, but the problem appears to be in the Fields View. 

Please go to the bug on the support site and use the Subscribe button to set up notifications as well as increment the count which is important to help teams prioritize.

Thank you

alex_friant
Frequent Contributor

Thanks Kory. I'm observing this issue in the Create Feature Class tool, Page 2/6 which is where you create fields. So, not exactly the same as the "fields view" bug, but closely related.

I'll try the work around. Thanks again.

Joey_Lecky
Occasional Contributor

I came across this bug recently. I wanted to add that the Alter Field tool also throws errors for field names longer than 30 characters, in addition to Fields View and Create Feature Class.

But tools with a fieldmap like 'Export Features' and 'Export Table' seem to be ok with field names longer than 30, and even if you enter a field name longer than 64 chrs it doesn't fail, it just truncates it to 64 (though it doesn't provide any warning beforehand or any indication in messages either). So, another potential workaround besides the Add Field tool. 

I noticed that the BUG page has a Last Modified date of April 21, 2025. I'm curious what updates there may be on this, if any? Under status it just says that this bug is a duplicate of ENH-000108054, but I can't seem to find a page for that or its status. 

I also noticed that in Pro 3.5 help it now says the max field name length in a file gdb is 128 characters. (I'm still on 3.4)

Joey_Lecky
Occasional Contributor

Update:

I updated to Pro 3.5.2 and it seems this issue has been resolved.  The 'Create Feature Class' wizard(?), the 'Fields View', and 'Alter Field(s)' tools all appear to be able to handle field names up to 128 characters and will truncate longer field names to 128. 

 

Although, (this is a little off topic from the original post now) I'm seeing a bug in the 'Alter Fields (multiple)' tool that I'm pretty sure was not there previously. For any/all fields it attempts to set the "New Field Type" parameter to 'Long' regardless of what the input field type is. And even though it says "New Field Type" is an optional parameter, it does not allow you to leave it blank. You can delete it but it instantly just repopulates with "Long (32-bit integer)". So in order to run the tool successfully you have to manually check what the input field type is an specify it or else the tool will return an error (ERROR 001658), or if run on an empty featureclass/table you may inadvertently change all fields to Long integer type. For text fields, the problem is worse because after setting the type to Text it will insist the 'New Field Length' parameter is 255, regardless of what the input fields length is - so you have to manually look up and enter a number equal to or greater than the current field's length, and there is the same issue of not being able to leave it blank even though it's supposed to be optional. 

In contrast the 'Alter Field' (singular) tool does not even have a parameter for 'New Field Type' (unless the 'input table' is empty and then it appears), but it correctly knows what type the input field is and will persist that field type by default. And similarly, if a text field is selected it correctly populates the current field length. This tool sets the user up for success. The 'Alter Fields (multiple)' tool currently sets the user up for failure and errors.

0 Kudos