>From: john@gagme.wwa.com (John T. Fontanilla)
>Subject: can you use a multi-screen form with one input statement in 4gl?
>Date: 23 Apr 1994 18:11:58 -0500
>X-Informix-List-Id: <news.6460>
>
>Hi there,
>
> Can one use a multi-screen form with one INPUT statement in
> 4gl? I'd like to do what isql does on tables which have
> lots of columns. For example, if I have a table with 50 columns,
> the default form generated by isql will be 2 screens. I cannot put
> all fifty columns on one screen because they won't fit. I also want
> to extend what isql does by having an ON KEY statement to switch
> screens instead of passing through all the fields in the form
> before getting to the next screen. Is what I'm saying possible?
> Please reply by e-mail. Thanks!!!
It is possible -- most things are.
It isn't easy.
The way I have done it in the past is to develop a separate screen form and
INPUT statement for each separate screen layout, and then use some higher
level code to handle calling the correct INPUT statement as things switch
between screens. You have to track which field you are in and which you
were in previously. It is possible to do it so that you can go backwards
from the first field in form C back to the last field in form B but that is
even less easy than the rest. Watch out for complications with null input
in a field in form A when the user hits the ACCEPT key in form B.
I have an example which was semi-automatically generated (it is a
pseudo-ISQL form for one table, so it includes more than just the input
code) with about 3500 lines of code total for a 3 screen system with about
5 fields per form (though a lot of that is standard code -- the extra
required for the multi-screen support is of the order of 500 lines all
told). I could post that to the net if enough requests were made to
justify it.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>