APPLICATIONS MAKER - HELP ON KEYS

When you opt to initialize a STRING ITEM as type KEY you are  telling
the  program  that  this item will be the basis of a  LOOKUP  into  a
datafile.   The purpose of a LOOKUP is to find and load a  particular
record so that information it contains can be made available for  use
in your application.

These KEYS are available to find records in any of the datafiles  you
have  chosen for your application.  The target datafile  is  selected
from a window during the initialization of the KEY ITEM.

KEY SOURCES:

Your keys can be of five types:  KEYBOARD entries, MENU files,  AUTO-
FILL,  BROWSE  and  EXPANDED.  From these you will be  able  to  find
records in many different ways, suitable to almost any need.

KEYBOARD KEYS:  With the KEYBOARD KEYS your user enters the data that
will  be the basis of the LOOKUP.  Within this  classification  there
are  two ways to find records:  by their RECORD NUMBERS and by  their
FILE INDEXES.

RECORD  NUMBER  lookups allow your user to  enter  the  user-assigned
record number of a record.

With  the FILE INDEX KEYS your user will enter the data contained  in
the target record.  The field containing the data for which you  will
search  must  be declared as INDEXED UNIQUE.  You  will  select  your
field from a window filled with the INDEXED fields.

DATAMAGE  offers  three  types of indexing: UNIQUE,  CROSS  and  NON-
UNIQUE.  Of these, only UNIQUE and CROSS indexed fields are  suitable
for  the  absolute  identification of a record, as  the  system  will
reject new/edited records having duplications in these fields.

APPLICATIONS  MAKER does not allow you to place CROSS-INDEXED  fields
on  the input screen.  These fields might have a formula attached  to
them or might be written into another file.  When the lookup into the
file  is executed, on entry of the last field in the cross-index,  it
might  fail.   This would produce an intractable situation.   If  you
wish  to allow your user to search the cross index you must  use  the
EXPANDED KEY type, detailed below.

MENU KEYS:  With the MENU KEYS you will make a menu file with a  word
processor,  in pure ASCII mode.  The menu file will be named  at  the
time you initialize your MENU KEY item.  This file can have up to one
hundred choices in it.  It must have TWO lines for each choice -  the
first  holding the text proffered to the user, the second  containing
the data returned to the program.  See the docs for APPLICATION MAKER
for further details on MENU items.

The  MENU KEYS are used to find a particular record,  associating  it
with a descriptive text which is chosen by your user.  You might have
an  application that processes sales and returns.  You might wish  to
add  the total generated to one record in a file if  the  transaction
was sale, and another if it was a return.

As  with the KEYBOARD KEYS your menu file may return ether  a  RECORD
NUMBER or the contents of a field indexed as UNIQUE.  Since there  is
only  one item returned from the menu file the MENU KEYS may  not  be
used in conjunction with the CROSS INDEXES.

AUTO-FILL  KEYS:   With the AUTO-FILL KEYS you  can  read/write  data
to/from  a particular record.  You make the KEY data a part  of  your
application,  and  the same record is found every  time.   Using  the
scenario  above,  you  might  branch to  a  different  part  of  your
application to process the sales and returns.  Then the choice of the
record in which to place your total could be made for the user.

AUTO-FILL keys may use ether RECORD NUMBERS or UNIQUE INDEXES.

BROWSE  KEYS:  With the BROWSE KEYS the target datafile is  read  and
displayed  in a window opened on top of your screen.  You select  the
field inertly displayed, usually the description of the record.   The
user may opt to change the display field.

Your  user can scroll through the file with his up/down  arrow  keys,
page  up/down  keys  or home/end keys.  When the  desired  record  is
highlighted your user hits return to select it.

You  also specify the field in the target file that will be  returned
to  the  program, and fill the item.  Your user may  NOT  change  the
field that is returned.

EXPANDED  KEYS:  With the EXPANDED KEYS your application screen  will
clear,  the  speaker  will beep, and the  lookup  will  be  displayed
complete with file number and it's description.  Your user will  have
the option of searching on the RECORD NUMBERS or the FILE INDEXES.

If  your  user opts for the file indexes the program will  display  a
screen  similar to the FIND RECORD function in the BASE program.   It
will  prompt  your user for all of the indexed fields in  the  target
datafile,  which  may be filled with a search value  or  bypassed  by
pressing return.

If  your  user fills a field that is declared as indexed  UNIQUE,  or
fills  all  of the fields declared as CROSS-INDEXED and  a  match  is
found  in  the  targeted datafile the record will  read  in  and  the
program will continue.

If your user fills a field or fields declared as indexed  NON-UNIQUE,
or  some  but not all of the fields declared as CROSS-INDEXED  and  a
match  is found the record will be displayed on a screen  similar  to
the  record access screen in the BASE program.  Your user  will  then
view the record.  After pressing Q to quit the record your user  will
have the option of accepting the record displayed, or continuing  the
search for the desired record.

If a record is not found the program will offer your user the  option
to  retry  the  search, or to quit.  If your user opts  to  quit  the
search the program will offer to find the record on any of the  modes
above.  If your EXPANDED KEY item has a label to handle bypasses your
user  will  have the option to continue, if not the  continue  option
will  be  replaced by the option to abort.  If the  abort  option  is
selected the APPLICATION will end with an error.

KEYS NOT FOUND:

Any  of the KEY TYPES may fail.  Your user may enter data into a  key
item  that is not found in the target file.  Or your user may  BYPASS
the key item by simply pressing return on it.

The  KEY ITEMS have the built-in option to handle bypasses by  either
branching  to a label, or aborting the application.  This is  defined
during the initialization of the KEY item.

In the event of your user entering data that is not found the program
will  not  halt,  but  will display five options  to  deal  with  the
situation:   RETRY, CONTINUE/ABORT, EXPAND, BROWSE and ENTER  RECORD.
If your KEY ITEM has a label to go to on the bypass of that item  the
second option offered to your user will be CONTINUE, else the  second
option will be ABORT.

RETRY will allow your user to try the KEY entry again.

ABORT will end the application and CONTINUE will bypass the item.

EXPAND  Will allow your user the option to search the file on  RECORD
NUMBERS,  or the FILE INDEXES.  If the FILE INDEX option is  selected
ALL of the indexes will be available as search targets.

BROWSE  will produce and fill the BROWSE WINDOW, and allow your  user
to video-select his record from the file.

ENTER  RECORD  will allow your user to enter a new  record  into  the
target  file.   This record will then become the source of  the  data
read/written to/from that file.

WRAP-UP:

As you can see, APPLICATIONS MAKER provides many ways to do a LOOKUP.
There is NO other data program that offers this power and flexibility
while finding records in relational files.