FileMan Delphi Components/TFMFiler

From VistApedia
Revision as of 04:18, 9 April 2012 by NeilArmstrong (talk | contribs) (Added glossary link to Record~)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TFMFiler Component

Parent Class

TFMFiler = class(TFMAccess)


Description

The purpose of the TFMFiler component is to file changes to the database. It uses the FILE^DIE and UPDATE^DIE DBS calls to file changes to the database.


For step-by-step instructions on filing data with a TFMFiler component, please refer to the "How to File Changes" topic.

Internal Lists

The TFMFiler component maintains two lists of data to file:

ChangedCtrlsList

A list of VA FileMan data controls containing data that should be filed (for example, the name of a TFMEdit component). Use the AddChgdControl and RemoveChgdControl methods to add and remove VA FileMan data controls from this list. The file, IENS, field, and data value to file are obtained from the named VA FileMan data control's properties at the time the Update method is called.

FDAList

An internal list holding data FDAs to be filed that is not associated with any VA FileMan data control. Place items on this list with the AddFDA method. For example, you could ask for a value to be filed in a given file, IENS, and field, independent of any VA FileMan data control.

To file the items in these two lists into the database, use the TFMFiler component's Update method. To clear the two lists, use the Clear method. To find out if there are any items in the lists waiting to be filed, use the AnythingToFile method.

When to Use More Than One TFMFiler Component on a Form

Typically, you would want to devote one TFMFiler component for each discrete set of fields you need to file values for on a form. If you are editing a set of fields from a top-level Record, and also a set of fields for Records in a multiple, for example, ordinarily you would use separate TFMFiler component for the multiple vs. the top-level Record. This keeps separate the change list for the multiple from the change list of the top-level Record, allowing each set of fields to be filed individually.

Descriptions of properties inherited from the parent component are not listed here (only those properties added to the parent component are described).

For help on inherited properties, please refer to Delphi's documentation on the parent component.