home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
util
/
misc
/
021
/
formget.doc
< prev
next >
Wrap
Text File
|
1993-04-20
|
7KB
|
202 lines
███████ ███████ ███████ ███████ ███████ ███████ ███████
██ ██ ██ ██ ██ █ ███ █ ██ ██ ███
███████ ██ ██ ███████ ██ █ ██ ██ ███ ███████ █
██ ██ ██ ██ ██ ██ ██ ██ █ ██ ███
██ ███████ ██ ███ ██ ██ ███████ ███████ ███
Purpose:
--------
Formget is a general purpose electronic form entry tool intended
for use with batch files.
Desciption:
-----------
Takes a form specification in the form of fields information.
Expects the fields' initial data in the form of separate files placed
in a particular directory. The modified fields are echoed back to
these files upon exit.
Features:
---------
Support the use of user specified tools for viewing and editing
memo fields.
Cursor moves automatically to next field to minimize typing.
Support user specified selection lists (also known as popups)
Support read-only fields and basic validation.
Support carrying data between a form data entry and another.
Form Specification:
-------------------
Formget reads a .FFI file which specifies the name of the fields and
their properties. The format is quite simple using one field
specification per line described as:
{field_name} {type} {req./opt.} [extraction_column] ;{description}
For example if you you were to design a form entry for a driver's
license application a sample LICENSE.FFI might look like:
STATE LIST RO ;state where applied
COUNTY LIST RO ;county where applied
NAME MEMO REQ ;first and last name
ADDRESS1 MEMO REQ ;address line 1
ADDRESS2 MEMO REQ ;address line 2
RACE LIST REQ 2 ;race
...
Field_name:
-----------
start with a letter and is an 8 chars or less and designates the
field name.
Type:
-----
defines the type of the field currently supported:
MEMO this means the field is a free text and this utility will invoke
the editor specified via the EDITOR environment variable to edit such
data.
LIST this means the field is a selection list, this utility expects
the presence of the a file {field_name}.LST to be present and which
contains literally the possible selections for the field.
Anything else means the field is read-only and will only be displayed.
Req./Opt.:
----------
This indicator helps perform some basic validation or integrity
checking. The following keywords are expected:
REQ means the field is required
OPT means the field can be left blank
RO means the field is to be treated as read-only, memo fields will
be displayed using the file viewing tool defined via the LIST
environment variable.
Extraction Column:
------------------
this only applies to the fields with type LIST and is used to
specify which portion from the selection list's text is to be stored
as the field actual data.
0 indicates that the whole selection line is to be treated as the
selected data, whereas any other positive integer is considered to
indicate which column to extract (columns are delimited with one or
more spaces). This allows you to present a selection list where only
a given column is the desired data to be stored permanently, whereas
the remaining text can be purely descriptive. For example you may
want to have to the following selection list (eg. stored in RACE.LST)
represents race groups to select from:
1 BLK Blacks
2 WHI Whites
3 ASI Asians
4 OTH Other
So, if you want to wanted the three letter keyword to end up in the
field data when the user makes a selection, you would want to use 2
as the extraction column.
Description:
------------
This describe the field and is usually used for prompting the
user about a given field during form entry. This text is expected at
the end of a field specification after a semicolon (;) used as the
delimiter.
How do I use this from a batch file?
------------------------------------
Configuration:
it is expected that the environment variables EDITOR
and LIST be defined. For example:
SET EDITOR=EDIT.COM
SET LIST=EDIT.COM
On startup this utility will expect the fields' default data (if
any) to be present in a dedicated directory (usually called FORM
unless otherwise specifed). The fields are expected to be present as
individual files without an extension matching the field_name. A
typical form setup and invocation might look like the following:
REM -- prepare fields in a directory
ECHO -- Preparing edit form...
MD FORM > NUL
ECHO OREGON> FORM\STATE
ECHO POLK> FORM\COUNTY
This initializes some of the fields (perhaps default values).
REM -- invoke the form editor (data entry)
FORMGET /F LICENSE.FFI -T"Driver License Application Form" /I3
IF ERRORLEVEL 255 ECHO "User has aborted editing"
This tell the utility to use the LICENSE.FFI file (see above) as the
form specification, it also defines a title used while the form is
displayed and instructs the cursor to be positioned on the 3rd
field on startup.
On exit this utility will update each individual field under the
above mentioned directory FORM and will create for each field
modified a matching file with a .MOD extension to indicate the field
was modified by the user.
Assuming this utility has just been exited the following script
demonstrates how to display only those fields that have been modified.
REM -- detect what has changed and display it
ECHO -- Displaying all changes made...
CD FORM
FOR %%F IN ( *. ) DO IF EXIST %%F.MOD MORE < %%F
CD ..
The following script will cleanup the form default data to get ready
for the next form entry. Note: you may want to leave certain fields
present to carry data onto the next form entry.
REM -- cleanup
FOR %%F IN ( FORM\*.* ) DO DEL %%F > NUL
RD FORM > NUL
See the demo provided.
Where to go from here?
----------------------
If you like this tool and would like to see more applications of it.
please refer to SRM package also available at the same source.
.END.
# VCS
### $Workfile: mak.vcs $
### $Revision: 1.0 $ $Date: 22 Dec 1991 09:37:56 $
### $Author: Abdenacer A. Moussaoui $
### $Logfile: B:/UR.VCS/MAK.VCV $
# VCS
##_12/07/1991_______________________________________________________________##