Enumerated widgets map database values that computers understand to values that people understand. For example, the value 'M' could map to 'Male', the value '18203' to '3 inch drill bit' or the value 'RWC-14232' to 'Readings in Western Civilization'. Enumerated widgets allow database designers to represent data efficiently within the database -- without requiring users to learn arcane codes or memorize unwieldly abbreviations.
DX provides Enumerated Widget types that make these fields trivial to implement. Because enumerated widgets present users with a finite list of elements to choose from, they must be implemented with a one-of-many Object Type: a Combo Box, Radio Box, List, Option Menu or similar widget.
For example, to create an enumerated widget that maps product_code to product_name using a Combo Box:
select Products.product_code,Products.product_name from Product
The map resource statement above selects two columns from the Product table: product_code and product_name. The first column specifies the value stored in the database. The second column specifies the value to be displayed and, if selected, mapped to the first column.
Next we'll change the ComboBox settings so that 4 items are displayed in the box. (By default, when you click on the arrow of a combination box, only one choice is displayed.)
Note that these product names are mapped to actual product codes. For example, when users add a product_name, the product_code will be stored in the database.