Documentation for dynfutil

Overview

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 tables

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.


dynfutil Reference

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.

  1. Frame to create field in (i.e. FRAME xyz:HANDLE)
  2. site-group-id of field to create
  3. Y Offset into the frame for the fields (optional - default 0)
  4. X Offset into the frame for the fields (optional - default 0)

CREATE-ALL-FIELDS frame-handle site-frame-id Yoffset Xoffset
Create all site fields for a frame

  1. Frame to create fields in (i.e. FRAME xyz:HANDLE)
  2. site-frame-id of frame to create fields for
  3. group-name of user to create fields for
  4. Y Offset into the frame for the fields (optional - default 0)
  5. X Offset into the frame for the fields (optional - default 0)

DESTROY-FIELD site-group-id frame-handle

  1. Destroy a single field
  2. site-group-id of field to destroy
  3. frame-handle of frame to destroy fields from

DESTROY-ALL-FIELDS site-frame-id frame-handle

  1. Destroy all fields for a site frame
  2. site-frame-id of the frame to destroy
  3. frame-handle of frame to destroy fields from

DISPLAY-FIELD site-group-id frame-handle sty-year-buff

  1. Display a single fields contents
  2. site-group-id of the field to display
  3. frame-handle of frame to display field for
  4. stu-year buffer of student to display from

DISPLAY-ALL-FIELDS site-frame-id frame-handle stu-year-buff

  1. Display all fields for a frame
  2. site-frame-id of the frame to display
  3. frame-handle of frame to display fields for
  4. stu-year buffer of student to display from

ENABLE-FIELD site-group-id frame-handle

  1. Enable a field for input
  2. site-group-id of the field to enable
  3. frame-handle of frame to enable field in

ENABLE-ALL-FIELDS site-frame-id frame-handle

  1. Enable all fields of a frame for input
  2. site-frame-id of the frame to enable fields in
  3. frame-handle of the frame to enable fields in

DISABLE-FIELD site-group-id frame-handle

  1. Disable a field for input
  2. site-group-id of field to disable
  3. frame-handle of the frame to disable field in

DISABLE-ALL-FIELDS site-frame-id frame-handle

  1. Disable all fields of a frame for input
  2. site-frame-id of frame to disable
  3. frame-handle of the frame to disable fields in

SAVE-FIELD site-group-id frame-handle stu-year-buff

  1. Save off screen value of a single field
  2. site-group-id of field to save
  3. frame-handle of the frame to save field from
  4. stu-year buffer of student to save to

SAVE-ALL-FIELDS site-frame-id frame-handle stu-year-buff

  1. Save off screen value for all fields in frame
  2. site-frame-id of frame to save fields from
  3. frame-handle of the frame to save fields from
  4. stu-year buffer of student to save to

DISPLAY-LABEL site-group-id frame-handle

  1. Display the label for a given field
  2. site-group-id of the field to display a label for
  3. frame-handle of frame to display field label in

DISPLAY-ALL-LABELS site-frame-id frame-handle

  1. Display the label for all fields for a frame
  2. site-frame-id of the frame to display field labels
  3. frame-handle of frame to display field labels in

CLEAR-FIELD site-group-id frame-handle

  1. Clear the contents of a field out
  2. site-group-id of the field to clear
  3. frame-handle of frame to clear field for

CLEAR-ALL-FIELDS site-frame-id frame-handle

  1. Clear the contents of all fields for a frame
  2. site-frame-id of the frame to clear
  3. frame-handle of frame to clear fields for

GET-HANDLE site-group-id frame-handle widget-handle

  1. Return a WIDGET-HANDLE for a field
  2. site-group-id to return handle for
  3. frame-handle of frame for field to return widget handle for
  4. widget-handle variable to assign handle to

GET-GROUPID widget-handle site-group-id

  1. Return a site-group-id for a WIDGET-HANDLE
  2. widget-handle to return site-group-id for
  3. variable to return site-group-id in

CHECK-REQUIRED-FIELDS frame-handle allValid

  1. Checks field validity
  2. frame-handle frame for the fields to check
  3. allValid returns whether all fields are valid


Last updated February 07,2000