[comp.databases] Oracle SQL*Forms Problem?

ravi@pds3 (Gorur R. Ravi) (03/16/90)

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.
-- 
Gorur Ravi (ravi)   uunet!pds3!ravi
Project Design Systems, Inc., 2231 Crystal Drive, Suite 1114,
Arlington, VA 22202

may@28182.dec.com (Patrick May) (03/16/90)

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.

------------------------------------------------------------------------
                              "A contract programmer is always intense."

may%nmeser.enet@decwrl.dec.com
..!decwrl!nmeser.enet!may

daved@usperb.Dayton.NCR.COM (Dave Dresselhouse) (03/18/90)

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