[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function SMALLS()
Action Lookup tables on dbf - no call to dbedit <small>
Returns
Category Lookup
Syntax Smalls(expC,[expC],[expC/N],[expC],[expC/N],[expC/N)
Description This is a next generation lookup engine, and is
the Son of Scroller(). (smalls = small scroller)
It is called directly as follows:
1. ExpC - the display string for the
lookup box.
Options 2. ExpC - a title for the lookup box
3. ExpC/ExpN - A. alias name or
B. numeric work area or
C. dbf/ndx in the format:
"%dbfname%ndxname"
4. ExpC - expression to keyboard if ENTER
pressed
5. ExpC/N - numeric - starting record
character - starting key
(only if indexed)
6. ExpC/N - numeric - ending record
character - ending key
(only if indexed)
Examples
(assumes dbf fields of LNAME and FNAME)
* lookup on "LNAME+' '+FNAME" in current area
smalls("LNAME+' '+FNAME")
...or
* lookup on "LNAME+' '+FNAME" in current area
* use "Name" as box title
smalls("LNAME+' '+FNAME","Name")
...or
* lookup on "LNAME+' '+FNAME" in current area
* use "Name" as box title
* go to area 5 for the lookup
* send LNAME to the keyboard if CR pressed
smalls("LNAME+' '+FNAME","Name",5,"LNAME")
...or
* lookup on "LNAME+' '+FNAME" in current area
* use "Name" as box title
* go to alias CUSTOMER for the lookup
smalls("LNAME+' '+FNAME","Name","CUSTOMER")
...or
* open customer.dbf and do a lookup on it
* lookup on "LNAME+' '+FNAME"
* use "Name" as box title
smalls("LNAME+' '+FNAME","Name","%CUSTOMER")
* open customer.dbf and do a lookup on it
* lookup on "LNAME+' '+FNAME"
* use "Name" as box title
* limit lookup to between records 50 and 60
smalls("LNAME+' '+FNAME","Name","%CUSTOMER",50,60)
* open CUSTOMER.DBF with LNAME.NDX and do a lookup
* lookup on "LNAME+' '+FNAME"
* use "Name" as box title
smalls("LNAME+' '+FNAME","Name","%CUSTOMER%LNAME")
* open CUSTOMER.DBF with LNAME.NDX and do a lookup
* lookup on "LNAME+' '+FNAME"
* use "Name" as box title
* limit lookup to JAAAA-ZZZZZ
smalls("LNAME+' '+FNAME","Name","%CUSTOMER%LNAME", ;
"JAAAAA","ZZZZZ")
Notes Very shortly (if not already done) I will be
modifying SCROLLER() to call SMALLS() instead
of DBEDIT(), thus reducing the weight of
SCROLLER() considerably.
The display string must evaluate to a character
expression when macro-expanded. For instance, a
date field called CDATE would crash if passed as
smalls("CDATE"), as it would evaluate to date type,
but if passed as smalls("dtoc(CDATE)" all would be
well.
The KEYBOARD expression must also evaluate to
type CHARACTER
Found in (prg)......S_SMAL.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson