# Coded Lists
> [HTML Version](codedlists.htm)
_Updated May 2021; see History_
Often, if a list has only a limited number of items, and especially if the description of those items might be lengthy, it makes more data processing sense to store the selected item as a coded number, rather than as text. For example, the program shown above ([Combo Box Control (INFLD)](comboboxcontrol(infld).htm.md)) actually stores the choices for the Zona field as a B,1 value, maintaining a table which translates the numeric codes into the descriptions which are seen above. Rather than having to do this work separately, you can let INFLD manage the table by adding _type_ **||L**, and specifying SETDEF as a list of pairs, i.e.
SETDEF=",01,Norte,02,Centro,03,Sul,04,Pink Zone,05,Hot Zone,06,Ozone,,"
In this case, INFLD displays just the descriptions, but returns to the program the numeric codes (in other words, letting the user and the programmer have it their own way.)
A sub-variation of the above causes INFLD to return both parts of the pair, i.e. "04,Pink Zone" if _type_ **||l** (lower case L) is used instead of **||L**.
Since INFLD typically trims the _xmax_ value to be no greater than the physical size of the _entry_ parameter, you may need to map the variable used for the _entry_ parameter large enough to display the descriptions in the coded list (rather than just large enough to hold the coded values).
**History**
2021 March, A-Shell 6.5.1701: List substitution (INFLD _type_ code **||l** or **||L**) now supports matching an empty field to a key entry in the list consisting of just blanks, provided that the _xmin_ parameter is not zero and the **O** (optional) _type _code is not set. For example, in the list
/ /Nowhere/01/Up/02/Down/03/Middle/
passing an empty field to INFLD will now match against the Nowhere entry in the list provided XMIN>0 and field not optional. Previously, null fields were not initially matched against the list, resulting in the initial field display defaulting to nothing.