Hi folks
Another solution is to create a temporary table to store the path a user
takes through a application to enable the user to backtrack with ease. At
each exit point run the command file quitto.rmd, see below. This can also
be a command block if you want. Note the temporary command files must be
on the terminal.
--In startup file create a temporary table
CONNECT databasename
CREATE TEMPORARY TABLE Where_am_I (Where_am_I_ref INTEGER,Quit_to_file +
TEXT(50))
AUTONUM Where_am_I_ref IN Where_am_I USING 1. 1. NONUM
--where I am comming from, this is SALES IN SALES.APX
OUTPUT c:\rbtemp\salesst.rmd
WRITE 'RUN SALES IN SALES.APX'
WRITE 'RETURN'
OUTPUT SCREEN
INSERT INTO Where_am_I (Quit_to_file) VALUES ('c:\rbtemp\salesst.rmd')
--next command
QUIT TO c:\rbtemp\salesst.rmd
RETURN
---------------------------------------------------------------------------
--quitto.rmd
--call this when you are finished with any command file or command block
--gets users leaving point from application
--get last entry from Where_am_I table
SELECT ('QUIT TO' & Quit_to_file),Where_am_I_ref +
INTO vQuit_to_file IND vi1,vWhere_am_I_ref IND vi1 FROM Where_am_I +
WHERE COUNT = LAST
DELETE ROWS FROM Where_am_I WHERE Where_am_I_ref = .vWhere_am_I_ref
&vQuit_to_file
RETURN
---------------------------------------------------------------------------
--add this code to a command file or command block that you want to
return to
--where I am comming from, this is calls.rmd
OUTPUT c:\rbtemp\callsst.rmd
WRITE 'RUN CALLS.RMD'
WRITE 'RETURN'
OUTPUT SCREEN
INSERT INTO Where_am_I (Quit_to_file) VALUES ('c:\rbtemp\callsst.rmd')
QUIT TO editcont.rmd
RETURN
Clear as mud no doubt!
Ian