[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             SYS(18)             |
+---------------------------------+

-----------------------------------
Returns the name (in upper-case) of the memory variable, array element
or database field used to create the current GET field or object.
Return value - Character
-----------------------------------

If a Browse, Change or Edit window is active, the name of the current
field is returned.

SYS(18) is identical to the VARREAD() function.  Both may be used to
pass the current field or object name to a procedure.  The procedure may
provide context sensitive help for each field.

See the VARREAD() function in this help facility for a program example
of context sensitive help.

+---------------------------------+
|             Example             |
+---------------------------------+
ON KEY LABEL F1 DO Help WITH SYS(18)
SET TALK OFF
USE customer
SCATTER TO temp
DEFINE WINDOW input FROM 6,10 TO 18,70 PANEL
ACTIVATE WINDOW input
@ 1,3 SAY 'Customer: ' GET company
@ 3,3 SAY 'Address: ' GET address1
@ 5,3 SAY 'City: '  GET city
@ 7,3 SAY 'State: ' GET state
@ 7,18 SAY 'Zip: ' GET zip
@ 9,08 SAY 'Press <Esc> to cancel or <F1> for help'
READ
IF LASTKEY() = 27
   GATHER FROM temp
ENDIF
DEACTIVATE WINDOW input
ON KEY LABEL F1
DISPLAY
RETURN

*** Help Procedure ***

PROCEDURE Help
PARAMETERS fieldname
DO CASE
        CASE fieldname = 'COMPANY'
                WAIT WINDOW 'Enter the company name' NOWAIT
        CASE fieldname = 'ADDRESS1'
                WAIT WINDOW 'Enter the entire street address' NOWAIT
        CASE fieldname = 'CITY'
                WAIT WINDOW 'Enter the city name' NOWAIT
        CASE fieldname = 'STATE'
                WAIT WINDOW 'Enter a two character state abbreviation' NOWAIT
        CASE fieldname = 'ZIP'
                WAIT WINDOW 'Enter the five digit Zip code' NOWAIT
ENDCASE
RETURN

-----------------------------------

See Also:  SYS(), VARREAD()

-----------------------------------

See Also: SYS() VARREAD()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson