Code List

From Wiki

Jump to: navigation, search
A Code List is a type of Admin Item. List100.gif

A Code List holds a collection of one or more Levels, which in turn hold collections of Code List Elements (also known as enumerations or codes).

Code Lists come in three flavours:

  • A List is a simple list of codes and meanings with no hierarchical relationships (e.g. the "ColourClass" Code List). All the Code List Elements belong to a single Level;
  • A Hierarchical Code List is a more complex structure comprising two or more Levels of Code Lists where lower level Code Lists all have a Parent Code List in the next level up and where the Level to which an element belongs is significant (e.g. a Town might be identified by a 4 digit number and is 'in' a County which is identified by a three alpha code);
  • A Tree is a cross between a Hierarchy and a List. It only has one Level (like a List) so all the elements obey the same set of rules and have the same code format but some may be the parents of others (e.g. a type of Thing might be identified by a 6 digit number and some might be broken down into further sub-types of Thing ad infinitum);

There are lots of Lists, several significant Hierarchies but few Trees.

Although most rules for a Code List are held within the Level template(s) there are a few rules that apply to the entire Code List and therefore are held within its template:

Property Description
Allow Double Spaces This controls whether Listpoint checks the Meanings for consecutive space characters or not. If switched off two or more consecutive spaces is treated as a business rule failure
Allow Duplicate Meanings This controls whether the same Meaning can be assigned to more than one Code or not. This can be necessary in some Code Lists (poor ones) but makes reverse lookups (translating a Meaning into its Code) impossible.
Allow Empty Meanings This controls whether the Meaning for a Code can be left undefined. If switched off every Code must have a Meaning that is not just spaces.
Allow Non-Alpha First Char in Meanings This controls whether a Meaning can start with a punctuation character or a digit. If switched off every Meaning must start with an alphabetic character

The Code List Elements contained in a Code List are exposed for consumption through Enumerated Data Types defined in each Context that uses them. This separates the peculiarities of how Code Lists are structured and managed from the values that standards and systems require.

How To guides for Code Lists are here

Code List Business Rules are here Listpoint

Personal tools