Defining Data Dictionary Properties for Non-Data Controls

VPME allows you to provide its Data Builder (data dictionary) functionality for form controls that are not data-bound (i.e., the control's ControlSource property is blank). This feature allows you to place a non-data-bound control on a form that can tap into most of the Data Builder field properties, integrity and permissions settings enjoyed by data-bound controls. For example, a non-data-bound control can have data dictionary-provided properties such as a label, default value, textual help, picklist help, validation rules and more.

A non-data-bound control can be used to gather information that you only need during some part of the processing of a form. A VPME non-data-bound control is like a memory variable on steroids. It stores a value entered by a user, but it has properties and methods plus VPME data dictionary settings.

VPM's special SVPMAPPLICATIONCONTROLS.DBF table in the SVPM database is the key to implementing this feature. You simply add a field to the SVPMAPPLICATIONCONTROLS table, set Data Builder properties for the field and use the field with the non-data-bound control. Here are the detailed steps:

1.   Data Builder: In the Data Builder, add a field to the SVPMAPPLICATIONCONTROLS table. Give the field an appropriate name. Make the field the appropriate type and width for the form control you have in mind.

2.   Data Builder: Set up the desired Data Builder properties and integrity for the new SVPMAPPLICATIONCONTROLS field.

3.   Form Designer: Add the appropriate control based on a control in the VPMCTRLS.VCX, DEVCTRLS.VCX or PROCTRLS.VCX class library to a form. The Name property of the control must be set to the field name you added to SVPMAPPLICATIONCONTROLS.

4.   Form Designer: Set the following properties of the control to link (not bind) the control to the new field (leave the ControlSource property blank):

·       cName_DDD = SVPM

·       cName_DDF = field name you added to SVPMAPPLICATIONCONTROLS


That's it. The form control now has the field properties you give it through the Data Builder or Data Manager.

Tip: Note that the SVPMAPPLICATIONCONTROLS table is not added to the DE of the form. The use of the SVPMAPPLICATIONCONTROLS table and the adding of fields to it simply provides a way to define field-level functionality and assign that functionality to a control through the “cName” control properties.

Tip: After a user enters a valid value into the control on a form, you can use the contents of the control's Value property in code that lets you do whatever you need to do with that value while the form is active.



Useful Form_ Class Properties