Class: FileValidationTable
Properties | Events | Methods | Index of Classes
Provides a two-column table of validation data for validation lists used with DataDictionary objects.
Hierarchy
cObject > Array > ValidationTable > DescriptionValidationTable > FileValidationTable
Show full hierarchy and direct subclasses
- cObject
- Array
- ValidationTable
- DescriptionValidationTable
- FileValidationTable
- CodeValidationTable
Library: Common Class Library
Package: DDValtbl.pkg
Description
This class allows maintaining a list of values and descriptions that can be easily loaded from a specified DataFlex database table.
Set the Table_Title property to describe or explain the list as a whole. Set the Main_File property to the number of the file that contains the data to be presented and used by this object. Set the Code_Field property to the number of the field in file that contains the value to use for validation or prompting. Set the Description_Field property to the number of the field in file that contains descriptive text to be presented with value to explain its meaning. Set the Ordering property to the number of the index of file by which to order the records containing the values and descriptions.
This is an object for assignment in DataDictionary objects to database fields with the Field_Value_Table property. It provides both values for insertion into the database and descriptions to explain each value. It draws its data from up to two fields of a database file identified in the definition of the object. Also specified in the object definition is the index of the database file by which to order the presentation of the values and descriptions.
If the Validate_State property is set to False, entries are permitted that are not in the list; in its default True state, it requires an entry that matches one of the existing table items. If the Static_State property is set to False, the list will be filled every time the table is activated; in its default True state, the object is loaded with its list only once in each session.
SQL Filters
FileValidationTables do not use psSQLFilter of a DataDictionary calling the object.
Sample
Object oStatusTable is a FileValidationTable
Set Main_File to CustStat.File_Number
End_Object
Any of the above validation tables can be linked to a field with the Field_Value_Table property in a DataDictionary.
Sample
Set Field_Value_Table Field Customer.Status to oStatusTable
Sample
This sample shows how to add a DataDictionary object to a FileValidationTable to add constraints to the object.
Object vtProductionLots is a FileValidationTable
Set Table_Title to "Production Lot Identifier"
Set Main_File to tProductionLots.File_Number
Set Code_Field to 2
Set Validate_State to True
Object oProdDD is a Code_Loader_Data_Set
Procedure OnConstrain
Constrain tProductionLots.Hide eq 0
End_Procedure
End_Object
Set Code_Load_Object to oProdDD
End_Object
See Also