dynfutil is a utility for allowing the end user to create, display, edit and store site/district specific fields and allow those fields to be added to standard frames in the SPM system.
dynfutil uses the site-fld-define, site-fld-group and site-frame tables to define the fields, where they appear, etc.
site-fld-define is used strictly to define fields that can be used later. It does not do anything for the fields visualization. site-fld-define can define a field of the standard Progress data types (CHARACTER, DECIMAL, DATE, INTEGER, LOGICAL) as well as Note, Contact, Table,Link, and State types.
The CHARACTER, DECIMAL, DATE, INTEGER, LOGICAL and Table field types store the actual data in the stu-site table. The Note type stores the data in teh stu-note table and the Contact type stores data in the stu-contact table. The State type uses state-items to define the dynamic field properties, and stu-state-item to define the data.
Link types are 'pseudo' types that just allow you to display alternate views of fields types with potentially multiple components (i.e. Notes, Contacts and Tables). Link fields are associated with a master field. All displays of the alternate views of the master field are in sync with the master field. If the master field is changed, all linked fields are redisplayed to stay in sync.
A typicaly 'Link' field usage is when you need to display the name of a contact and always want to display the phone number. You'd create a 'Contact' field for the contact name and then a Link field for the contact phone that was linked to the contact name. Whenever the contact name changed, the contact phone would automatically be updated as well.
site-frame defines a frame (or container) that the site-fld-define fields can eventually be associated with. It does not actually do the association, it just defines the known containers for later associations.
site-fld-group is the mapping between the site-fld-define and site-frame tables. It introduces a third 'key' which is the users login group name. This allows different sets of users to have different views of data using any combination of site-fld-define records and a specific site-frame container.
site-fld-group contains information on the location of the field, whether the field is read-only or read-write, if the field is a tab stop, etc.
While a FRAME widget can be associated with multiple site-frame definitions at the same time, each site-frame can appear on any given frame only once. A site frame may appear on several different frames and a frame may have several differet site-frames on it, but there can never be more than one instance of a site-frame on a specific frame widget.
DEFINE [NEW]
This must be present in any module which will be using any if the
dynfutil services. The instantiating procedure must use the
NEW keyword. Any child procedures should omit the NEW keyword or they will
start another instance of dynfutil.
CLEAN_UP
This must be invoked by the procedure that created the current instance of
dynfutil. It releases all allocated resources and terminates
the instance associated with the current procedure. Generally, the module
that used DEFINE NEW is the same one that should have a CLEAN_UP call.
You must make sure that all exit paths in your program properly invoke the CLEAN_UP service. If not, your program will consume an unnecessarily large amount of memory which can only be freed by exiting the Progress session completely!
CREATE-FIELD framehndl site-group-id Yoffset Xoffset
Create a single field for a frame.
CREATE-ALL-FIELDS frame-handle site-frame-id Yoffset Xoffset
Create all site fields for a frame
DESTROY-FIELD site-group-id frame-handle
DESTROY-ALL-FIELDS site-frame-id frame-handle
DISPLAY-FIELD site-group-id frame-handle sty-year-buff
DISPLAY-ALL-FIELDS site-frame-id frame-handle stu-year-buff
ENABLE-FIELD site-group-id frame-handle
ENABLE-ALL-FIELDS site-frame-id frame-handle
DISABLE-FIELD site-group-id frame-handle
DISABLE-ALL-FIELDS site-frame-id frame-handle
SAVE-FIELD site-group-id frame-handle stu-year-buff
SAVE-ALL-FIELDS site-frame-id frame-handle stu-year-buff
DISPLAY-LABEL site-group-id frame-handle
DISPLAY-ALL-LABELS site-frame-id frame-handle
CLEAR-FIELD site-group-id frame-handle
CLEAR-ALL-FIELDS site-frame-id frame-handle
GET-HANDLE site-group-id frame-handle widget-handle
GET-GROUPID widget-handle site-group-id
CHECK-REQUIRED-FIELDS frame-handle allValid