Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development

> ## Validation and other schema information

> You should avoid using schema field validation because it is not executed in Progress Dynamics applications. The Progress Dynamics Object Generator eliminates the inheritance of schema validation from a generated SDO’s temp-table definition. If the framework did not have this behavior, references to a `CAN-FIND` in the field validation expression would be compiled into any viewer or other frame-based component built against that SDO. The resulting viewer would not run without the database connected on the client, which is unacceptable in a distributed deployment.

> Compiling field validation into the user interface can cause other problems. In particular, the standard Progress frame behavior does not allow you to leave a field whose value does not pass the validation, even if, for example, you are generating a `LEAVE` event by selecting a button. Generally, step-by-step field validation is not considered appropriate for GUI applications. A user expects to enter data more flexibly and have control over when to correct an invalid value.

> In addition, dynamically generated viewers or other UI components, including those of a non-Progress interface, cannot use the schema validation. Therefore, you cannot count on it as the primary mechanism for verifying correctness of your data. You should build field validation into the back-end business logic where it always executes.

> You can use lookups and combos to enforce the kind of validation done by a `CAN-FIND` or a validation expression that defines a list of valid values. Lookups and combos provide autocompletion and a list of values from which the user can select. This is preferable to simply flagging an invalid entry and forcing correction before the user can leave the field.

> On the other hand, specifying in the schema the appropriate values for the `Label`, `Column-Label`, `Format`, and `VIEW-AS` phrase for a field is very useful. This determines the default look of any viewer or browser you build. For a dynamic viewer, it gives you the proper representation of all your fields without any coding or customization.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095