Domain code and description max lengths

998
6
05-12-2022 02:33 AM
R_Millman
New Contributor II

Does anyone know what the max text lengths are for code and description fields in geodatabase domains?  I can't seem to find the information anywhere.

Tags (2)
0 Kudos
6 Replies
RobertBorchert
Frequent Contributor III

It appears to be greater than you should use. I just created a test domain with a hundred characters or so for the code and a lot more for the description.  I would suspect it is limited to 255

0 Kudos
jcarlson
MVP Esteemed Contributor

"Greater than you should use", I really like that way of putting it. I pasted some placeholder text into the code and description to see where it cuts off.

The Code appears to have no limit. Or at least, I stopped checking after 500k characters, since it seemed like Pro was starting to have trouble with it. Longer than you should use, for sure! That makes sense, since the code is the actual stored value of a field, and its limits are based on the field settings.

The description cut off at 254, which would confirm @RobertBorchert 's suspicion.

- Josh Carlson
Kendall County GIS
0 Kudos
EmillyBaechle
New Contributor

There may not be a specified limit of the description characters but the text must be able to fit in the field so the field length must be long enough. And the max field length is 255.

0 Kudos
R_Millman
New Contributor II

It was some time ago now that I was originally looking at this but I think the issue I was having is that you can apply a domain to text field where the text field is much longer but the domain gets truncated.  254 seems a likely cut off however it's not documented anywhere within the esri pages that I could find.  We have text attributes for site survey staff that allow for much longer descriptions and the domains were still cutting short.

0 Kudos
EmillyBaechle
New Contributor

Interesting. My experience trying to edit the field is that I get an error when selecting a domain that has a description that is more characters than the field length 😞

0 Kudos
R_Millman
New Contributor II

Ah, I'm talking about the other way round though - the text attribute length is much longer than the length of the domain description but the description gets truncated.

0 Kudos