Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pacbell!rtech!squid!robf From: robf@squid.rtech.com (Robert Fair) Newsgroups: comp.databases Subject: Re: resuming to a new field in form. Keywords: ingres frs Message-ID: <3432@rtech.rtech.com> Date: 22 Aug 89 13:56:50 GMT Sender: news@rtech.rtech.com Reply-To: robf@squid.UUCP (Robert Fair) Distribution: na Organization: Relational Technology, Inc. Lines: 70 >>From: bg0l+@andrew.cmu.edu (Bruce E. Golightly) > >It can't be done under Ingres 5.x. I even tried a couple of things to >fool the system, and those didn't work either. > The original posting Bruce is replying to hasn't reached here, but you certainly can move to different fields in both ESQL and 4GL, to resume to a new field on the form just do: EXEC FRS RESUME FIELD ; in ESQL, or: resume field ; in 4GL. Similarly you can resume on a specific tablefield column using: EXEC FRS RESUME COLUMN ; or resume field
. ; There are other more specialized variants like resuming on the "next" field/column: EXEC FRS RESUME NEXT; or resume next; (This is only useful in a field/column activation when you have left a field and are conceptually already on your way to another field - INGRES checks the key entered by the user to determine what the "next" field is - go forwards, backwards etc and then goes there.) There are also things like resume on the menu, and resume at the same place: EXEC FRS RESUME MENU; EXEC FRS RESUME ; or: resume menu; resume ; These all work in both INGRES 5.0 and R6. The only tricky case is moving to the "next" field from an frskey or menuitem activation, which is fairly uncommon, since generally this is trying to duplicate features the FRS provides automatically (moving from field to field, running a block of code on leaving a field/column etc). If the problem is a spec which says "user will press function key 7 to move from field to field", then use a mapfile to map the input key to the builtin FRS functions like "nextfield" or "previousfield" and let the FRS do the work. In the very rare case where you want to still control tabbing using a menuitem and a generic "next" field, a little programming can do the trick (basically the INQUIRE_FRS/INQUIRE_FORMS statement lets you find out where you are, the RESUME statement lets you put the field/column name in a variable to dynamically change the field - you just provide the mapping from "here" to "there", which can be done several ways, from asking the FRS, to querying system catalogs, to defining your own sequence). All this can be put in a library routine, so you just do (in ESQL): get_next_field(next_field); EXEC FRS RESUME FIELD :next_field; or for 4GL: next_field=callproc get_next_field; resume field :next_field; Robert Fair Technical Support, Relational Technology, Inc