Creating a DescriptionValidationTable Object

By basing our validation table on the supplied ValidationTable subclass, DescriptionValidationTable, we can provide a description for each item.

Object oStatusTable is a DescriptionValidationTable

    Procedure Fill_List

        Send Add_Table_Value "O"  "Opened"

        Send Add_Table_Value "C"  "Closed"

        Send Add_Table_Value "D"  "Flagged for Deletion"

    End_Procedure

End_Object

The validation process and the data that is read and written to your database will remain unchanged. Your DEOs will handle this table a little bit differently. Depending on the class of the DEO, the data will be presented in data format, description format, or as a combination of data and description. Your entry forms (dbForm and dbGrid) will always display the actual data values. A prompt list will present the data and the description when invoked from the DEO. Combo forms (dbComboForm, dbGrids with combos) and radio entry objects (dbRadioGroup) will display just the description. With prompt lists, combos and radios, you can actually choose to display any combination of data and description. However, you should find that the description-only model is the most-widely used method across applications.

See Also

Using Validation Tables