OVERVIEW.............An overview of the dCLIP Data-Entry System
MOUSE................How to navigate the editing system with the mouse
HOT KEYS.............Using the Hot-Keys
KEY NAVIGATION.......How to navigate the editing system with the keyboard
WINDOW CONFIGURATION.Configuring an editing window
FIELD CONFIGURATION..Configuring fields and selecting fields to edit
TILE-EDITING.........How to create multiple editing windows
APPENDING RECORDS....Appending a new record while editing
DELETING RECORDS.....Deleting a record while editing
EDITING FIELDS.......Editing the data in fields
EDITING MEMOS........Editing, Importing, Exporting Memo fields
VIEWING MEMOS........Creating a memo viewing window
SEARCHING FOR DATA...Searching for a record in an editing work-area
VIRTUAL FIELDS.......Creating "Virtual" or "Resultant" fields from equations
ROLL-BACK............Roll-back record data
VIRTUAL RECORD.......Creating, Appending and Saving a Virtual Record
IMPORTING DATA.......Importing data from another work area
REPLACEMENT MACROS...Replacing data by Macro expression
KEYBOARD MACROS......Creating Keyboard Macros
RELATIONAL EDITING...Creating Relational Editing Windows
CUT AND PASTE........Cutting and Pasting data fields
SAVE AND RESTORE.....Saving and Restoring an Edit Configuration
QUICK-DOT............Invoke a dot-prompt to control the edit with commands
OVERVIEW
An overview of the dCLIP Data-Entry System
Description:
The dCLIP editing (data-entry) system is designed to give you
the same editing power with data that your editor or word-
processor gives you with text. Each open work area has it's own
data-entry configuration which is stored and remembered when
saving work to disk. The Edit-system is a complete database
manager, not just a full-screen-editor. While in any edit
window you can open/close database and index files, run any
database utilities, create and print reports, etc.
USER-CONFIGURABLE
The data-entry system is designed to allow you to configure
the presentation of your data as you desire. You can size or
delete fields, change the descriptors, validations, pictures,
default values, encryption, location of each field in each
edit window, size and locate the edit window(s) on the screen,
create resultant fields based on field equations, put data-
entry field-groups in "pages", display multiple windows, or
choose several display modes. Fields from parent and child
databases may be merged in a single data-entry screen or in
mulitiple windows. Designing a field configuration is quick
and easy via the use of hot-keys, cursor-pad keys and the
mouse.
PROGRAMMER-CONFIGURABLE
Data-entry under dCLIP is basically a "living application"
therefore it may be reconfigured to provide a large variety of
options for the user and the programmer. Often, it is
necessary to "limit" the features of the system to focus in on
a specific data-entry task. This is accomplished by creating
a custom menu, key group, screen group, and file group using
their respective "editors" then "attaching" these items to a
specified edit configuration via "tag-names" or by calling
the functions created when saving each item to source code.
For example, a template for the default edit menu is included
in the DCMENU.DBF dictionary and can easily be loaded into the
menu editor (See command MENU EDIT), saved to the menu
dictionary (or source code), then attached to a data-entry
configuration by using the DC_EDITRESTORE()function. The
programmer can basically design a complete data-entry system
without writing any code at all. This is done by using the
edit design tools built into the standard menu and hot-keys,
saving the configuration to the edit dictionary (or source
code) and then recalling the data-entry from custom code, from
a hot-key or from a menu by a simple call to DC_EDITRESTORE().
SAVE AND RESTORE EDITING CONFIGURATION
After designing the field configuration, validations,
locations, descriptors, etc. the screen configuration can
be save to an array-file, the data-dictionary, or source-
code.
RELATIONAL EDITING
Fields from all relational work areas can be merged in a
single edit window or a different window for each area.
Relational editing configurations can be created by simple
commands from the dot-prompt or by a pick-list of options from
edit menus. With relational editing you can create multiple
child windows that are automatically updated as you move
through the parent window.
DATA EDITING
Fields can be modified by simply pointing to the desired
record/field and pressing the (enter) key for data-editing
mode. New records can be appended by moving to the bottom of
the file and pressing the ENTER key, by pressing the (Alt-A)
key or by selecting APPEND from the menu.
CUT AND PASTE
Data can be "cut" from any field (even memo fields) and
"pasted" into any other field of any record of any work area
by a few keystrokes. An entire record can be "captured" and
saved to a virtual record for using as a "default data
template" when appending new records, or for simply "pasting"
into any existing record. Data can be "imported" from any
other work area by first creating and saving an "import map"
from a menu that let's you match field to field. After loading
the import map, you can point to a record in one work area,
then copy the information to a new or existing record in the
target area by a single keystroke.
DATA VALIDATION
Data can be validated upon entry of each field by assigning a
"Validation type" property to the field when editing the field
properties with the FIELD EDIT command. Validation insures
that data is properly entered and also that the user is given
plenty of pick-list options.
DEFAULT DATA
Default data can be automatically filled in when appending a
new record by assigning a "Default" property to the field when
editing the field properties with the FIELD EDIT command.
Default data can be fixed values, values returned by fields
from related database(s) or values returned from expressions.
See Also:
dc_editdb()
EDIT
MOUSE
How to navigate the editing system with the mouse
Description:
Pressing the F1 key will display navigation information.
Navigation through the currently selected editing window is
accomplished by clicking the left mouse button on the
following icons:
UP ARROW Select Previous Field
DOWN ARROW Select Next Field
UP HALF-DIAMOND Select next group (page) of fields
DOWN HALF-DIAMOND Select previous group (page) of fields
LEFT DOUBLE ARROW Go to Top of File
RIGHT DOUBLE ARROW Go to Bottom of File
RIGHT HALF-DIAMOND Skip to Next Record
LEFT HALF-DIAMOND Skip to Previous Record
LEFT ARROW Go to First Displayed Field
RIGHT ARROW Go to Last Displayed Field
Any field can be selected directly by placing the mouse cursor
over the desired field and clicking the left button.
Navigation to other currently open browse or edit windows is
accomplished by the clicking the left mouse button when the
mouse cursor is located over any portion of the desired window.
See Also:
dc_editdb()
HOT KEYS
Using the Hot-Keys
Description:
Select Hot-Keys under the HELP menu to display a list
of all available keys for data-editing and configuration.
Special functions are activated by the following keys:
Insert Tag a set of Fields for Data-Entry
Space Set "Tabs" or select an Edit area
Enter Edit selected field
Ctrl-U Delete/Recall Record
Alt-Period Invoke a Dot-prompt
Alt-A Append a new record
Alt-Z Toggle Screen ZOOM mode
Alt-G Grab Field (Copy contents to Field ClipBoard)
Alt-R Replace Current Field from Field ClipBoard
Alt-L Continue last "Locate" search
Alt-M Replace Field from MACRO
Alt-I Replace Record from IMPORT MAP record
Alt-O Replace Record from VIRTUAL record
Alt-J Grab Current Field (in Field order list)
Alt-K Relocate Grabbed Field to current location
Alt-/ Go to Previous/Marked Record (Toggle)
F1 Display Context-HELP for current field
Alt-F2 Edit current field Editing properties
Alt-F3 Browse the Edit Field List
Alt-F4 Add a Field to the Edit Field List
Alt-F5 Insert a Field in the Edit Field List
Alt-F6 Set Drag Descriptor/Field Mode ON
Alt-F7 Set Drag Field only Mode ON
Alt-F8 Set Drag Descriptor only Mode ON
Alt-F9 Mark START and END of Block of Fields
Alt-F10 Reserved
Alt-F11 Move all Fields Up (from current field)
Alt-F12 Move all Fields Down (from current field)
Alt-Right Move current or Marked field(s) RIGHT
(when drag mode is ON)
Alt-Left Move current or Marked field(s) LEFT
(when drag mode is ON)
Alt-Up Move current or Marked field(s) UP
(when drag mode is ON)
Alt-Down Move current or Marked field(s) DOWN
(when drag mode is ON)
Alt-1..Alt-9 Select Page 1 thru Page 9
ESCAPE Abort Editing (if editing), or
Abort Drag Mode (if in Drag Mode),
otherwise, Exit Data-Entry system.
ENTER Edit Selected Field
CTRL U Delete/Recall Record
CTRL J Set Item Order ++
Alt-A Append mode
Alt-Z Toggle Screen ZOOM mode
Alt-G Grab Field to Memory
Alt-R Replace Field from Memory
Alt-L Continue "Locate" search
Alt-M Replace field from MACRO
Alt-I Replace from IMPORT MAP
Alt-O Replace from VIRTUAL record
Alt-J Grab Current Field
Alt-K Relocate Grabbed Field
Alt-Y Define Field Parameters
Alt-W Sort Fields on Screen
Alt-B Toggle Goto / Drag Mode
Alt-Rt Goto or Drag Item Right
Alt-Lt Goto or Drag Item Left
Alt-Up Goto or Drag Item Up
Alt-Dn Goto or Drag Item Down
Ctrl-Rt Move Grouped Items Right
Ctrl-Lt Move Grouped Items Left
Ctrl-Up Move Grouped Items Up
Ctrl-Dn Move Grouped Items Down
Ctrl-N Move All Items Down
Ctrl-Y Move All Items Up
. Invoke a Dot-Prompt
KEY NAVIGATION
How to navigate the editing system with the keyboard
Description:
Press the F1 key for navigation information while in the edit
window.
Navigation through the currently selected editing window is
accomplished by the following keys:
Up Arrow Select Previous Field
Down Arrow Select Next Field
PgUp Select Previous Page of Fields
PgDn Select Next Page of Fields
Ctrl-PgUp Go to TOP of file
Ctrl-PgDn Go to BOTTOM of file
Home Go to First "Displayed" Field
End Go to Last "Displayed" Field
Ctrl-Right or ) Skip to Next Record
Ctrl-Left or ( Skip to Previous Record
Ctrl-Home Go to First Field in Field list
Ctrl-End Go to Last Field in Field list
Navigation to other currently open editing windows is
accomplished by the following keys:
Tab Select Next "Tabbed" Edit area (file)
Shift-Tab Select Previous "Tabbed" Edit area
Del Delete Selected Field from Data-Entry Screen
WINDOW CONFIGURATION
Configuring an editing window
Description:
An edit window can be configured in size, color, location,
field location, field descriptors, and type of information
displayed. For configuring fields, see the seperate section
titled FIELD CONFIGURATION.
SIZING AND LOCATING WINDOW WITH KEYBOARD
When a new edit window is created with the EDIT command, it is
automatically configured to fill the entire screen. The window
can be resized by selecting (W) from the VIEW pull-down menu,
then selecting (E) from the sub-menu. A blinking cursor will
appear at the upper-left corner of the box. Pressing the (TAB)
key will move the cursor around the perimeter of the drag box
to allow dragging of any corner or any side of the box. Use the
arrow keys to drag the box to the desired location of the screen.
Press the (ENTER) key to select the new window coordinates or
the (ESCAPE) key to abort the drag process.
SIZING AND LOCATING WINDOW WITH MOUSE
The window can be re-sized by placing the mouse on the
upper-left or upper-right corner (first line below menu-bar),
the lower-left or lower-right corner, the left, right or bottom
edge, or the top edge (first line below menu-bar) of the
currently selected window, then clicking the left button. A
blinking cursor will appear at the corner or edge of the box
that was clicked on. Hold down the left button of the mouse and
move the box corner or edge to the desired location of the
screen. After the box has been moved to the desired location,
simply release the mouse button to repaint the window.
ZOOMING A WINDOW
A window can be Zoomed to fill the entire screen by pressing
the ( Alt-Z ) key in the selected window. This is a toggle
action function so another key press will re-size the window
back to the original coordinates. The mouse may be used to
Zoom the window to full-size by clicking on the Up Arrow that
is painted in the upper right corner of the window when it is
in a non-zoomed state. The mouse may be used to Zoom the
window back to it's original coordinates by clicking on the
Down Arrow that is painted in the upper right corner of the
window when it is in a zoomed state.
COLOR CONFIGURATION
Each editing window can be configured to it's own set of colors
by selecting a color set from a pick list. Select ( P ) from
the VIEW OPTIONS menu to choose a color set. NOTE: You must
first create your desired color sets by using the COLOR SETUP
command at the dot-prompt, from the ASSIST menu, or by using
the DC_CLRSETUP() function.
TOGGLING DISPLAY OF FILE INFORMATION
The default condition of the editing window is to display the
current Work area, File alias, Index Tag Name, and Index key at
the top of each window. If you wish to see more information,
select ( T ) from the VIEW OPTIONS menu to display the full
name(s) of database tables, indexes, options, filters, and
conditional index expressions.
TOGGLING DISPLAY OF WINDOW SHADOWS
When creating editing windows that are butted-up next to each
other, the shadows around the windows can overlap in such a way
that is visually unappealing. Select ( N ) from the VIEW
OPTIONS menu to toggle the display of the window shadow for the
selected window.
STICKY EDIT MODE
"Sticky Edit" refers to a mode of operation in which the
config- uration of an editing screen is "remembered" for the
life-time of the running application. If STICKYEDIT mode is
ON, then the user can exit the edit mode, perform any other
system operation, and when the edit routine is called again the
old edit configuration is retained. If STICKYEDIT mode is OFF,
then the edit screen is repainted with the default
configuration each time the user renters the edit. The default
"system" configuration for STICKYEDIT is OFF. This can be
changed by adding the command STICKYEDIT=ON in your DCLIP.SYS
file or SET STICKYEDIT ON at the dot prompt. Each editing
window can be toggled from ON to OFF by pressing the ALT-T key.
FIELD CONFIGURATION
Configuring fields and selecting fields to edit
Description:
The EDIT or DATA-ENTRY window is made up of "real" database
fields and/or "virtual" fields. Database fields from any
work area can be placed into an edit window and can be
displayed and updated. Virtual fields are fields that do
not exist in any database but instead are calculated based
on an equation or an expression that includes fields,
memory variables, functions, or a combination of all.
Virtual fields cannot be edited but can only be displayed.
The default configuration when editing a workarea is to
capture all the fields in the current workarea and all child
workareas into the configuration array and place them on
the screen in the order that they appear in the database(s).
Each field is assigned a display "page". The default is to
assign all fields to Page 1 even if there are more fields
than can fit in the page. The fields will automatically
scroll up/down or left/right in the window whenever a screen
boundary is exceeded with the arrow keys or pgup/pgdn keys.
Each field can be configured for descriptor name, color,
picture, validations, screen location, context-help, default
value, display page, encryption, and pick-list options.
Configuration of the "properties" of a "real" database field
can be accomplished only in the FIELD EDITOR which can be
called from the Data-Entry menu or from the dot prompt
command FIELD EDIT. Some properties of a field are considered
to be "global" to the application, therefore they cannot be
modified in the Data-Entry screen. These properties are
field name, type, length, validation, help prompt, help code,
encryption, etc. These properties are stored in the
DCFIELDS.DBF (field-dictionary) table. Other properties of a
field are unique to the custom data-entry configuration being
created, such as descriptors, colors, pick-list options,
screen location, etc. These properties are stored in the
DCEDIT.DBF (edit-dictionary) table.
TILE-EDITING
How to create multiple editing windows
Description:
Tile-Editing is a term describing the placement of multiple
editing windows in the display in a "pattern" to work with
several databases at the same time. Use tile-editing to
establish relations, to facilitate cut-and-paste operations
between several databases, or to simply make it easier to
monitor data in several work areas at the same time.
SIZING AND LOCATING AN EDITING WINDOW
When a new edit window is created with the EDIT command, it is
automatically configured to fill the entire screen. The window
can be resized by selecting ( W ) from the VIEW OPTIONS menu.
A blinking cursor will appear at the upper-left corner of the
box. Pressing the ( TAB ) key will move the cursor from the
upper-left to the lower- right corner. Use the arrow keys to
drag the box to the desired location of the screen. Pressing
the TAB key again will move the cursor to all four corners
which will allow you to move the entire box anywhere on the
screen after you have set the size.
AUTOMATIC TILING
The EDIT TILE command is a simpler method of creating multiple
edit windows. This function will automatically determine the
size and location of each window depending on the number of
databases being edited. For example, if you open three
databases then issue the command EDIT TILE, three windows will
be opened with the display sectioned in vertical thirds. EDIT
TILE WINDOW (Mode) is used to tell the edit system exactly the
style of windows to display.
Mode
1 Four windows ( screen split in half vertically and
horizonally )
2 Four windows ( screen split horizontally )
3 Three windows ( screen split horizontally )
4 Two windows ( screen split vertically )
5 Two windows ( screen split horizontally )
6 Six windows ( three across / two down )
SELECTING A WINDOW
The ( TAB ) and ( SHIFT-TAB ) keys are used to move forward
and backward through the various browse windows.
See Also:
EDIT TILE
dc_edittile()
APPENDING RECORDS
Appending a new record while editing
Description:
Edit-screen appending is accomplished by one of the following
methods:
1. Select the last record in the database browse, then press
the CTRL RIGHT key to place the record pointer to END-OF-FILE,
followed by the ( ENTER ) key.
2. Press the ( ALT-A ) key.
Pressing the ( ENTER ) key again will save the changes and
move to the next field. Pressing the ( CTRL-W ) key will save
the changes and resume editing mode at the current field.
Pressing the ( ESCAPE ) key will abort changes to the current
field and resume editing mode at the current field. Pressing
the up/down arrow keys will save the changes then move to the
next field.
SETTING APPEND MODE
You can configure the default method in which data that will
be filled in to the new record when it is appended. The default
for a new edit configuration is "Blank Record". If you desire
that some fields be filled with default information, then it is
recommended that you establish the new record data mode as
the "Virtual Record". See VIRTUAL RECORD for more information.
If you desire that some fields be filled with information from
another work area, then it is recommended that you establish the
append mode as an "Imported Record". See IMPORTING DATA for
more information.
You can also configure the default method in which records will
be added or reused when appending a new record. The default for
a new edit configuration is to "Append a New Record" to the
bottom of the database. You may choose to re-use records that
have been previously retired or deleted by selecting "Re-Use
Deleted Records (if any)" or "Re-Use Blank Records (if any)".
If no deleted or blank record is found then a new record will
be added.
DELETING RECORDS
Deleting a record while editing
Description:
SETTING DELETE MODE
You can configure the default method in which data that will
be deleted when pressing the DELETE key. The default for a new
edit configuration is "Mark for later Deletion". Records
that are marked for deletion will be displayed with an asterisk
in the left column unless the SET DELETED flag is ON. In this
case the record will disappear from the browse view. Records
that are marked for deletion are permanently removed when
PACKING the database.
To configure the default delete method select DELETE OPTIONS
from the EDIT menu. The following options will be displayed:
1. No Action
2. Mark record for later deletion (default).
3. Blank all fields in record.
4. Use Custom delete function (enter a code block).
DELETING A RECORD
To Mark the currently selected record for later deletion,
select DELETE RECORD from the EDIT menu. To delete a record
using the default method previously established as described
above in DELETE OPTIONS.
See Also:
dc_editdb()
EDIT
EDITING FIELDS
Editing the data in fields
Description:
Modifying the data in any field is accomplished by first
selecting the desired field with the up/down arrow keys then
pressing (ENTER) to enable full-screen editing mode. The
blinking cursor in the selected field is the indicator that you
are in EDIT mode rather than VIEW mode. After modifying the
data in the selected field, the (ENTER) key or (CTRL-W) key
will save the changes. If the (ENTER) key is pressed, the
cursor will move to the next field after saving the current
field and editing will resume. If the (CRTL-W) is pressed, the
data will be saved and the editing mode will be suspended. If
the (ESCAPE) key is pressed, the changes will not be saved.
You may use the up/down arrow keys or page up/page down keys
while in the Full-screen editing mode.
EDITING MEMOS
Editing, Importing, Exporting Memo fields
Description:
Memo fields can be edited by simply selecting the desired field
in the display then pressing (ENTER). The memo editor provides
full text editing of the contents of any memo field. Press key
(F1) for a full description of the editing keys and editing
options.
CUT AND PASTE
While editing, the (F2) key will set markers in the text so
you can "cut" all text between the markers and capture it in
memory. This captured text can then be "pasted" anywhere in
the same memo or any other memo with key (F4). Key (F5) will
save the blocked text to a file, and key (F6) will allow text
to be inserted from a file.
IMPORTING TEXT
Text from any ascii file can be imported into the selected
memo by selecting (O) from the EDIT pull-down menu and (I)
from the sub-menu. You will be prompted for the name of the
file to import and how you want to import the text. You have
the option to Replace all existing text, Insert the imported
text in front of existing text, or Append the imported text to
the end of the existing text.
EXPORTING TEXT
Text from the current memo can be exported into any ascii file
by selecting (O) from EDIT pull-down menu and (X) from the sub-
menu. You will be prompted for the name of the file to export
to and how you want to export the text. You have the option
to Replace all existing text, Insert the exported text in front
of existing text, or Append the exported text to the end of the
existing text.
VIEWING MEMOS
Creating a memo viewing window
Description:
A window may be created on the screen for viewing the contents
of memos as you navigate through the edit display. This is
accomplished by first selecting a memo field, then pressing key
(V) for View Options followed by key (V) for "Change Memo
Viewing Window". A sub-menu will appear to allow you to open,
re-size, or close a memo-window. Only one memo-window can be
created for each edit area, however, all memo fields in the
databases can be displayed in the window. When opening or
re-sizing a window, a "drag box" will appear on the screen for
sizing and locating the window using the cursor keys or mouse.
NOTE: Any portion of the memo window that overlaps the edit
display area will not be displayed, therefore this feature
will have no effect if your edit window fills the entire
screen.
As you navigate through the edit window fields, the
last-accessed memo field will determine which memo field will
be displayed in the event that your database contains more than
one memo field.
SEARCHING FOR DATA
Searching for a record in an editing work-area
Description:
Searching for a record can be accomplished in many ways.
AUTO-SEEK
The term "Auto-Seek" refers to locating a record by typing a
value that matches a key in the currently selected index or
in one of the available indexes. If the value typed in matches
the value in the currently selected index, the record will be
selected. If the value does not match the selected index, then
all indexes will be searched in the same manner as described by
HUNTING A RECORD (described below). Auto-Seek mode can be
toggled on and off (default is off) by selecting AUTO-SEEK from
the SEARCH / FIND pull-down menu.
LOCATING A RECORD
The term "locating" refers to scanning of all records in the
database and stopping at the first record that meets the
condition. The editing system supports two methods of
locating:
QUICK-LOCATE allows you to search for a record by scanning the
currently selected field for a matching value. Select ( Q )
from the SEARCH OPTIONS menu.
LOCATE allows you to search for a record by evaluating a
condition based on information in multiple fields in the
current work area and all child work areas. LOCATE uses the
Query-Builder system to help you build a condition. The first
record that matches the condition will be displayed in the
browse window.
CONTINUE LOCATE refers to continuation of the scan from the
current record based on the previous QUICK-LOCATE or LOCATE
condition.
FINDING A RECORD
The term "finding" refers to using an index tag or index file
for instantly seeking to the first record that matches the key
value entered. Select ( F ) from the SEARCH OPTIONS menu to
find a record by an index key. A menu will appear with a
listing of all open index keys and an input screen to enter a
value. Move to the desired key and enter a value. When a
value is entered into one of the keys, all records in the index
that match the key will be listed in a browse-style window to
select the desired record. If only one record matches the key
value entered, you will immediately be returned to the Browse
display at the selected record. If no records match the key
value, the old record pointer will be restored.
HUNTING A RECORD
HUNT is a method of FINDing a record by searching all open
index files or tags for the value entered. This is the
quickest method of finding information by scanning all the keys
for the first match. The value entered on the command line is
automatically converted to the proper "type" to perform the
seek. For example, if you entered a value of 12.5, only
numeric indexes will be seeked, or if you enter a date type
only date indexes will be seeked. If you enter expression,
such as DATE()-30, then only the indexes that match the type of
the expression entered will be seeked.
Using HUNT and RESUME is the fastest method of finding
information in a large database that uses many index keys. It
is recommended that you build a set of keys for all fields that
you want to include in the HUNT operation. This can be
accomplished easily by using the INDEX FIELDS command to create
a set of tags all at one time.
Select (H) for HUNT or (R) for RESUME from the SEARCH OPTIONS
menu.
VIRTUAL FIELDS
Creating "Virtual" or "Resultant" fields from equations
Description:
A "Virtual field" is created by entering an equation that
combines information from one or more fields in the current
work area or any relational "child" area. Virtual fields
can be displayed only and cannot be edited. A Virtual field
may be used to add, subtract, divide or multiply numeric
fields to display a "result".
To create a Virtual field, select (F) from the VIEW pull-down
menu then select (A) to add a field configuration.
See FIELD CONFIGURATION for more information about how to fill
in the field configuration for a virtual field.
Examples:
1. Let's say you want to create a Virtual field named
"Profit" from fields named EXPENSES and SALES. The
EXPENSES field can be subtracted from the SALES field to
display the desired result.
You would enter the resultant equation as follows:
SALES - EXPENSES
2. Let's say you want to create a Virtual field named
"Month" that displays the month that a sale was made. The
SHIP_DATE field contains the date of the sale however it is
formatted as a date field. To display the month in a
resultant field, you would enter the expression as follows:
Pad( Cmonth( SHIP_DATE ), 10 )
ROLL-BACK
Roll-back record data
Description:
Sometimes it is desirable to restore the original data after
mistakes were made when editing a record. This technique of
restoring the original data is referred to as "roll-back".
The EDITING system allows you to roll-back all the data in
a record or only the data in a specified field.
To roll-back the data in the current record or field, select
(R) from the EDIT pull-down menu.
NOTE: Each time a new record is selected, the current data
is captured to an array. This means that the rollback data
for only the last record accessed is available. Once you
move the record pointer to a new record, the roll-back data
for the previous record will be lost.
VIRTUAL RECORD
Creating, Appending and Saving a Virtual Record
Description:
A VIRTUAL record is a record that is temporarily stored in
memory to be used as a "template" for making appending or
replacing data in records much easier. Any record in the
current database can be "captured" to the Virtual record by
simply selecting the desired record then selecting (V) from
the EDIT pull-down menu and (C) from the sub-menu. Only one
virtual record can exist in memory at any one time and will
be overwritten each time the (V) and (C) keys are pressed.
SAVING THE VIRTUAL RECORD
The captured virtual record can be permanently saved to disk
by selecting (V) from the FILE pull-down menu, the (U) from
the sub-menu. A file with same name as the work area file
and the extension .DCV will be created in the same directory
as the database file. The virtual record can be restored
from the file by selecting (V) from the FILE and (L) from
the sub-menu.
APPENDING NEW RECORDS USING VIRTUAL RECORD
When appending new records, you can fill in all the fields
from the virtual record to eliminate the need to enter
information that may be duplicated for each new record such as
today's date or other commonly entered information. To enable
the virtual record as the default appending mode, select (S)
from the EDIT pull-down menu for "Set Append Mode", then
select "Virtual Record". To actually append a new record, press
the (Alt-A) key or Select (A) from the EDIT pull-down menu.
REPLACING THE CURRENT RECORD WITH THE VIRTUAL RECORD
The data in all fields of the currently selected record can
be replaced by the data in the Virtual record by pressing
selecting (V) from the EDIT pull-down menu and (V) from the
sub-menu.
IMPORTING DATA
Importing data from another work area
Description:
Data from another work area can be copied to the currently
selected record or appended to a new record by using a Field
Map. A field map is loaded into memory from a .DCF file
previous created with the IMPORT CREATE command or from the
UTILITIES MENU. A field map provides information necessary to
determine how information from one database is to be copied or
appended to another database of a different type and structure.
LOADING A FIELD MAP
Select ( P ) from the FILE OPTIONS menu to load a field map
file into memory. You will be prompted to enter the name of
the .DCF file for loading and the file will be tested to
insure that it associates only fields from currently open work
areas.
REPLACING FIELDS FROM ANOTHER WORK AREA
After loading a field map into memory, you must first select a
record from the "import" file work area that you want to
import. Press the (TAB) key to select the editing window of
the import work area, then select the desired record. Press
(TAB) again to select the work area you are importing TO, then
select the record you want to replace with the data from the
import record. Press the ( Alt-I ) key to replace the fields
in the target file with the mapped data. Only the actual
fields that are "mapped" via the Field Map file will be
replaced, all others will not be affected.
IMPORTING NEW RECORDS FROM ANOTHER WORK AREA
After loading a field map into memory, you can append selected
records from the "import" file work area into the target file
work area. This feature requires that you first select ( S )
from the EDIT OPTIONS menu and choose ( I ) (import) as the
default append mode. Use the ( TAB ) key to move between the
two editing windows then the ( Alt-A ) key to append the
selected import record to the target file. Only the fields
that are "mapped" via the Field Map file will include imported
data, all others will be blank and must be filled in.
Example:
Let's say you have a MAILLIST.dbf (FoxPro) database and you
wish to append selected records from a HOTLEADS.db (Paradox)
database. The following dot-prompt commands will setup this
work project so you can accomplish this task over and over
again with a minimum of effort.
// First-time setup
. USE MAILLIST VIA 'DBFFOX' // Open Maillist.dbf
. USE HOTLEADS VIA 'PDX' NEW // Open Hotleads.db
. CREATE IMPORT MAILIMP // Create Mailimp.dcf
. BROWSE TILE // Build browse windows,
// load map,
// select append mode,
// setup columns
. SAVE WORK TO MAILIMP // Save everything to disk
// Importing new records selectively via browse system
. RESTORE WORK FROM MAILIMP // Restore databases,
// browse windows
. EDIT // Enter editing mode
Now that you are in the editing system, you can selectively
decide which records from HOTLEADS.db you wish to append to
MAILLIST.dbf. Simply move to the desired record in the import
window, select the target window and move to the bottom of the
file. Pressing the down arrow key will append the import file
record to the target work area. Fill-in the blank fields or
modify the imported fields to complete the transaction, then
repeat the process for each desired record in the import work
area.
NOTE:
Only one field map may be active for each work area. If you
load a field map in one work area, it will not be active in
any other work area.
REPLACEMENT MACROS
Replacing data by Macro expression
Description:
Data in a selected field can be replaced by information in
other fields of the same work area or child work areas. Using
macros to replace information is a form of "cutting and
pasting" that allows use of an expression for formatting the
"pasted" information in any form desired.
To create a field-replacement macro, select ( M ) from the
EDIT pull-down menu, ( F ) from the sub-menu, then enter the
expression. The expression must be a valid CLIPPER expression
using field names or functions. Pressing the ( Alt-F ) key will
pop-up a list of current fields and child fields to help you
build the expression.
After the macro is created, select the field to replace, then
press ( Alt-M ).
Examples:
1. Let's say you want to reformat the data in a NAME field so
only the first letter of each word is capitalized. You
would enter the macro as follows:
dc_capfirst(NAME)
2. Let's say you want to replace the information in the NAME
field with concatenated information in two relational
fields. You would enter the macro as follows:
trim(CUSTOMER-)LAST) + ", " + trim(CUSTOMER-)FIRST)
3. Let's say you want to update the DUE_DATE field with today's
date plus 30 days. You would enter the macro as follows:
date() + 30
NOTE:
Only one replacement macro may be active for each editing
window. If you create a replacement macro in one editing
window, it will not be active in any other editing window.
KEYBOARD MACROS
Creating Keyboard Macros
Description:
A keyboard macro is a sequence of key-strokes that are stored
in a single key. The default key for storing keyboard macros
is (Alt-K). After storing a keyboard macro, press the (Alt-K)
to invoke the stored key sequence. Currently, the browse
system does not support a key "learning" system because key
strokes from other windows or inside editing "gets" cannot be
automatically learned. Instead, the suggested method for
creating macros is the following:
1. Test the key process you want to create by pressing the keys
in the sequence required to perform the desired results.
2. Write down or remember the order of the keys pressed as you
are processing the keystrokes.
3. Select ( K ) from the EDIT OPTIONS menu to start the key
storing process, then press the keys in the same order as
they were originally entered. Press ( F10 ) to save the
macro or ( F9 ) to abort the process. NOTE: a character
representation of each key stroke will be displayed on the
screen. Do not be alarmed if the character displayed is not
what you expect, the keystrokes will be stored as entered.
Examples:
1. Let's say you want to create a keyboard macro for importing
a sequence of records from another work area then modifying
the data in each new imported record.
First, you must insure that you have already loaded a Field
Map by selecting ( P ) from the FILE OPTIONS menu. Next,
select the import file browse area with the ( TAB ) key and
move to the record to start importing. Select the target
browse area with the ( TAB ) key. Now the following
sequence of keystrokes will select the import area, move the
record pointer to the next record, re-select the target area,
append the import record to the target file and edit the new
record:
( TAB ) ( DOWN ARROW ) ( SHIFT-TAB ) ( Alt-A )
When the above key sequence is stored as a keyboard macro,
simply pressing the ( Alt-K ) key will repeat the import
process for each record you desire to import.
RELATIONAL EDITING
Creating Relational Editing Windows
Description:
Relational editing is accomplished by using the EDIT RELATION
command. The command syntax is the following:
EDIT RELATION [WINDOW (mode)] (alias1) INTO (into1) ;
[,(aliasn) INTO (inton)
EDIT RELATION provides a tiled editing configuration for Parent
and child work areas.
Relational windows will automatically be updated as the record
pointer is moved through the primary window. The TAB key can
be used at any time to select any window and make updates or
configure the view of data.
See the examples under the EDIT RELATION command for more
information.
CUT AND PASTE
Cutting and Pasting data fields
Description:
Cut and Paste operations are accomplished by first "grabbing"
the contents of a field with the ( Alt-G ) key, then "pasting"
it to another field with the ( Alt-R ) key. This action will
always overwrite the data in the target field with the data
from the grabbed field. You can grab a memo field from one
record and paste to a different memo field in a different work
area. If you want to append to existing data, then it is
recommended that you create a REPLACEMENT MACRO.
Only one "grab" buffer is available for all work areas, because
many cut and paste operations are accomplished between
different windows.
If the target field is not the same type as the grabbed field,
then the ( Alt-R ) key will be ignored when pressed. If the
target field is shorter than the grabbed field, then the
grabbed data will be truncated to the length of the target
field.
The same "grabbed" data may be pasted into many different
fields by simply selecting the field to replace and pressing
the ( Alt-R ) key for each replacement.
The normal procedure for cut and paste is as follows:
1. Select the work area browse window with the SPACE or TAB key
that contains the data you want to grab.
2. Move to the desired record and field with the cursor keys.
3. Grab the data from the selected field with the ( Alt-G )
key.
4. Select the target work area with the SPACE or TAB key.
5. Move to the desired target record and field with the cursor
keys.
6. Replace the data in the selected field with the grabbed data
by pressing the ( Alt-R ) key.
SAVE AND RESTORE
Saving and Restoring an Edit Configuration
Description:
Once an editing configuration has been created, i.e., window
size, relational hooks, memo viewing window, field order and
sizes, macros, descriptors, etc., the configuration can be
saved to a file for restoring later. This is accomplished by
selecting (F) for File Options and (S) to "Save Configuration
to a File". You will be prompted for a name to assign to the
file and a default file name will be filled in with the same
name as the current alias and the extension .DBE.
PRODUCTION-EDIT CONFIGURATION FILE
If you don't change the default name, then the configuration
file will be named (alias).DBE and will be treated as a
"production-edit" configuration file that will automatically be
loaded the first time you enter an edit window for a work area.
CUSTOM-EDIT CONFIGURATION FILE
If the name that you assign to the configuration file is
anything other than (alias).DBE, the configuration will not be
changed unless you load the configuration file from the edit
(F)ile Options menu - Suboption "Load Configuration from a
File" or with the EDIT RESTORE (cConfigFile) command.
See Also:
EDIT RESTORE
QUICK-DOT
Invoke a dot-prompt to control the edit with commands
Description:
Many times it is faster to accomplish a desired task while
editing by simply invoking a command-line rather than pressing
keys to navigate through menus. The ( . ) key will bring up a
dot-prompt for entering any command you wish. For example, if
you want to go to a specific record, reindex the open file,
select another work area, etc., just press the ( . ) key, enter
the command(s), then return to editing by pressing ( enter ) at
the dot-prompt with no command.
For example, let's say you have a MAILLIST.DBF and a
MAILLIST.CDX index with many index tags open in a work area.
Now you wish to hunt for some specific information using the
HUNT..RESUME commands. Press the ( . ) key for a command line,
then enter the following command:
. HUNT SCOTT
If "Scott" is found in an indexed field, the edit window will
be redisplayed with the selected index and selecting the first
record with the name "Scott". If what you really wanted was
the first "Scott" in a different indexed field, then enter the
command:
. RESUME
If "Scott" is found in another indexed field, the display will
be re-painted with the new index selected.