Validate_Foreign_File_State - DataDictionary
Determines if field validation should be applied to foreign (parent) tables
Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None
Syntax
Property Integer Validate_Foreign_File_State
| Access Type | Syntax |
|---|---|
| Read Access: | Get Validate_Foreign_File_State to IntegerVariable |
| Write Access: | Set Validate_Foreign_File_State to IntegerVariable/Value |
Description
Set Validate_Foreign_File_State to False
Before a save occurs, you will want to validation all fields by sending the Request_Validate message to the DDO performing the save. Normally all fields in all tables that participate in a save will be validated. This includes fields that have no visual representation in the current view and this includes all fields in all ancestor tables. In almost all cases, this level of data protection is desired, and is a powerful feature of the data dictionary. In rare cases, you may wish to select lower levels of validation protection.
The property Validate_Foreign_File_State determines if field validation should be applied to foreign (parent) tables. Normally you want this level of validation, so its default value is true. Setting its value to false will skip field validation when the table is used as a parent table in your DDO structure. It will also suppress validation in all additional ancestor tables.
Setting this property away from their defaults essentially defeats full field validation and potentially compromises data integrity. They should only be used under carefully controlled circumstances.
Do not use this property as short-cut solutions to bad database design. Special conditional validation rules can be programmed directly into your validation routines. For example, you could build a validation routine that only applies a field validation to new records (check the record's status with the HasRecord property) or you could create validation routines that selectively skip certain fields when they are foreign (the Operation_Origin global integer tells you which DDO started the save). Rather than breaking a rule, attempt to define this rule change as part of your rule set. In the end, you will have a better, more-robust application.
See Also