Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!ncrlnk!usglnk!usperb!daved From: daved@usperb.Dayton.NCR.COM (Dave Dresselhouse) Newsgroups: comp.databases Subject: Re: Oracle SQL*Forms Problem? Keywords: ORACLE SQL*FORMS Message-ID: <471@usperb.Dayton.NCR.COM> Date: 18 Mar 90 15:58:24 GMT References: <174@arkham.enet.dec.com> Reply-To: daved@usperb.Dayton.NCR.COM (Dave Dresselhouse) Distribution: usa Organization: NCR Corporation - U. S. Group Lines: 39 Summary: Expires: Sender: Followup-To: In article <174@arkham.enet.dec.com> may@28182.dec.com (Patrick May) writes: > >In article <1990Mar15.170856.8924@pds3>, ravi@pds3 (Gorur R. Ravi) writes... >>I have an application which uses Oracle SQL*Forms. It is designed to >>consist of 6 pages (6 screens in different pages) all belonging to >>one block (Table). Now the problem is whenever one enters the query mode >>in Pages 2 thro' 6 the (dumb?) SQL*Forms puts the user in Field 1 of >>Page 1. Is there a way to restrict users to the same page and preferably >>to the same field? I do not want to have 6 blocks, one for each page >>because I will then have the problem of coordinating these blocks after >>the query. We are using SQL*Forms ver. 2.3.16 running on Prime/Unix. >>Any help will be appreacited. Thanks. > > >Try defining a KEY-ENTQRY trigger that saves the current position, performs >the change to query mode, and returns to the saved position. This is just >a guess, I haven't worked with Oracle in a few months. > I don't think there is any way to get around being returned to the first page to *enter the query conditions*. The suggestion mentioned above will in fact return you to the field you started from *after* you enter your query conditions. It appears that that Forms places the cursor in the lowest sequence number field that is queryable upon pressing the ENTER QUERY key, or executing the ENTQRY macro. The following trigger will get you close to what you want to do: Trigger Type: KEY-ENTQRY (1) #COPY GLOBAL.CURRENT_FIELD GLOBAL.SAVE_FIELD (2) #EXEMACRO ENTQRY; (3) #EXEMACRO GOFLD &GLOBAL.SAVE_FIELD; Trigger Type: KEY-EXEQRY (1) #COPY GLOBAL.CURRENT_FIELD GLOBAL.SAVE_FIELD (2) #EXEMACRO EXEQRY; (3) #EXEMACRO GOFLD &GLOBAL.SAVE_FIELD; These two triggers should be defined at the BLOCK level. ---------------------------------------------------------------------------- Dave Dresselhouse dave.dresselhouse@Dayton.NCR.COM NCR Corp, U.S. Group Dayton, Oh