Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!ctrsol!ginosko!uunet!mcvax!hp4nl!eurtrx!papegaai From: papegaai@eurtrx.UUCP (SKBS) Newsgroups: comp.databases Subject: Re: Oracle menus? Message-ID: <420@eurtrx.UUCP> Date: 24 Jul 89 08:23:33 GMT References: <5598@pt.cs.cmu.edu> Lines: 38 tew@n.sp.cs.cmu.edu (Thomas Warfel) writes: >I recently inherited a job maintaining a PC/RT running ORACLE, including >SQLPLUS, SQL*FORMS, and PRO*C. I want to write a series of menu forms >that can branch from one to the next, or EXIT back to the calling menu. >What is the easiest way to do this? SQL*FORMS won't let me define a form >without mapping it to a table, and unless it modifies the table in some >way, I get a fatal error leaving the form. The answer is, yes, it is possible. There are various ways to do it, all of which are more or less complicated. The trick I used most goes along the following lines: 1) create a form based on a table called DUMMY. This table has only one record and only one field and is not used for any other purpose than this; 2) make sure the single field from the DUMMY table is invisible (page 0); 3) then create as many fields (all non-database) as you have choices to represent; 4) write a key-trigger (pick any key) that contains a CASE statement checking the current field, calling a different form for each field the cursor can be in; This works fine, as long as you make sure that all the fields are either update protected or contain a trigger that automatically clears them of any input as soon as the cursor leaves them. By triggering the cursor movement keys, you can make the screen-navigation behave exactly as you like. I do not have access to the code right now, and it's been almost a year since I wrote anything in SQL*Forms. If you need more information, contact me, and I will see what I can do for you. B.C. Papegaaij BSO/Artificial Intelligence bv The Netherlands