Re: Question regarding positioning within "input array"
Posted in 1998
I would have to disagree with Jonathan on this one. It is possible, it's just not pretty. What you need to do is as follows: 1) Define an invisible field on your form. This field should be the last field in the access path for a row and be defined as no-entry/noupdate. 2) In your input array statement, you need to do the following. In the before input clause, you need to initialize a counter to 1. 3) In your before row clause, check the value of your counter against the value of the row that you want to go to. If it is less, do a next field <invisible field>. Since this is a noentry/noupdate field, the cursor will automatically skip to the next row in the array, activating the before row clause again, etc. until you reach your desired row. See the code fragment below for a short (syntactically incorrect) example. input array p_array before input let CurrentRow=1 before row if CurrentRow < DesiredRow then next field skip_field end if end input This can also be adapted to allow a conditional delete of an input array row. I will see if I can dig up the code and post it here if anybody is interedted. One word of warning: If you have a lot of elements in your array and the row you want to go to is near the end, there is a very noticable scrolling effect and you may have more than one user get sick on their keyboard from watching it. Jonathan Leffler wrote: > On Thu, 9 Jul 1998, Denis Cloutier wrote: > > I'm on I-4GL version 6.05 and was wondering if [...] there's a > > way to position myself at an array element that I designate > > within an "input array" control block. > > This is not possible in Classic I4GL. > > On the other hand, it is possible in the new Dynamic 4GL. > > Yours, > Jonathan Leffler (jleffler@informix.com) #include <witticism.h> > Guardian of DBD::Informix -- see http://www.perl.com/CPAN