Domains - Codes and Descriptions

672
2
07-30-2018 11:22 AM
KatyWichman
New Contributor II

My question is more about what is a best practice for coded values in a file geodatabase.  I have a polygon feature that has a domain called ServingAreaType and two coded values.  This GDB was not created by me, rather it will be maintained by the GIS team I am a part of.  The person who created the GDB, who no longer works here, told our team that the code and description should always match.  This doesn't really make sense to me so I need second opinions.  Wouldn't it be better to have the description actually say what the code is supposed to represent?  Or should they match?  See the attached screenshot. 

 

And to take this a step further, if you have numbered coded values, you would definitely want a description otherwise people wouldn't know what the attributes meant.  Is there a way to create number coded values that have an alias so when people are filling out the attributes upon creation, they can see the description rather than the coded value in the drop down?  If this is possible with an alias, is there really a point to having number coded values in the first place?

Tags (2)
0 Kudos
2 Replies
deleted-user-qpvAI3Fo0MKR
Occasional Contributor III

The Description field should very clearly spell out the intention of the domain. For example, the domain name may be AssetOwner. The description could be "All inclusive list of electrical, water and gas asset owners".

When creating coded value domains (for text) I'll typically make the coded value something like My_Coded_Value and the description will be My Coded Value.

In your case, you're describing wanting to use numeric coded values and then use text as the description. I susepct that historically this was likely best practice since storage was more at a premium, and storing numbers was cheaper than long strings of text...however, anymore this doesn't seem to be the case. If you set up your domains with integers in the Coded Value field, and then a text description in the Description field, your users will see the Description in the dropdown when editing.

Does this help?

0 Kudos
MattGoodman1
Occasional Contributor

This is a pretty old thread, but for what it's worth...

When using numbered codes for your domain, if you want the user to be able to see/know the code as well as  the description, I suggest something like...

Domain: ServingAreaType

CodeDescription
11 - PSA
22 - VSA
33 - ASA

 

Or similarly, if your codes is an abbreviation:

Domain: ServingAreaType

CodeDescription
PSAPSA - Public Service Area
VSAVSA - Valued Service Area
ASAASA - Allied Service Area

 

0 Kudos