Re: Puzzling forms
Posted in 1998
On 7 Apr 98 at 12:48, Jorgen Lehmann wrote:
> Dear Sirs,
You forgot the madams. There's lots of madams here...
> This is the situation:
>
> Suppose I got a table containing the following fields:
> field_1, field_2, field_3 and field_4 and I want them displayed to
> the user in a scrolling array..
>
> The problem is, that I only got screen-columns enough to display field_1
> and field_2, so I have to display the remaining fields in a non-scrolling
> area, where the values are displayed when the user enters the appropoate
> record
>
> (hmmm, is this making sense ?? - English is not my born language)
>
> To clarify, this is what I would like to present to the user:
>
> Title Cat.
> [Blade Runner ] [Science Fic..]
> [Terminator ] [Action ]
> [Gone with the wind] [Love story ]
> [ ] [ ]
> ------------------------------------
> Starring Rel.
> [Ford, Harrison ] [1984] <-- These are field_3 and field_4
So as they move onto each new line, you want the bottom two fields to
be changed or updated?
I would use an INPUT ARRAY (just because it's more flexible -- soner
or later your going to want to do something you can't do in a DISPLAY
ARRAY). Do a BEFORE ROW to check if there already is data and then
display it in the bottom part and have an ON KEY to take the user
into that section to update the data on the screen. Then use your
AFTER ROW section to do the actual data updates (or inserts, as the
case may be).
Something like:
INPUT ARRAY ga_whammy FROM sa_whammy.*
BEFORE ROW
CALL clear_bottom() -- no comment
CALL set_bottom() -- display data values
AFTER ROW
IF data_changed()
THEN
UPDATE whammy
SET blah, blah, blah
WHERE whatever
END IF
IF new_whammy()
THEN
INSERT INTO whammy....blah, blah, blah
END IF
ON KEY (CONTROL-U)
CALL input_bottom() -- no comments from the peanut gallery!
END INPUT
HTH.
--
Ciao,
Billy
/Group Managing Director, The West Solutions Group: http://www.west.co.za
\\ Drivel @ http://www.west.co.za/tasteless/
/
\\ "Granted, Mr Wheeler's ideas are stupid and unreasonable, but he does own the company and I
/ think we should go along with him..."
\\________________________________________________________________________________________________