Display Array Question
Posted in 1994
>Newsgroups: comp.databases.informix >From: shemminga@cix.compulink.co.uk ("Stuart Hemming") >Subject: [News] Re: Advanced use of 'DISPLAY ARRAY', or 'aiming too high?' >Message-Id: <Cvn7yw.A0y@cix.compulink.co.uk> > >> } > } System: SunOS 4.1.3_U1 (SPARC) >> } Engine: 5.01.UD2 >> } SQL: 4.10.UE1 >> } R4GL: 4.11.UC1 >> } > } Here's one I couldn't solve (easily) in 4.1, and I've come >across > } it again. >> } > } I'm using 'DISPLAY ARRAY' to present a list of choices to the >user; > } this may run to hundreds of choices, in a 5- to 10- line >scroll > } area... >> > If you get a solution, I'd love to see it. > >You are not alone. A "proper" display array is probably near the top of >all 4GL users wishlist. > I too wish the display array would change, to allow me the use of the before and after row items such as the input array allows; however, that does not solve this person's problem...though I am not sure what it is because of the ... instead of the problem. The following information may be elementary to some but not to others -- when I first came to Russia to work on a project, the programmers I came into contact with here in Saint Petersburg did not know the information mentioned in item 1 below. 1) You can set the scroll area to the number of items you wish to use, 5 or 10 or whatever number you wish. The set_count used before the display array can exceed the number mentioned in the scroll area. You can set options for paging forwards (normally the F4 key) or backwards (normally the F5 key). Of course this is tedious when having to process a large amount of items but pressing the F4 key or F5 key many times can align them to their possible area of selection quickly enough if the descriptions (or whatever) are sorted in a manner readily known to the user. 2) You can set up a query before the display array to allow them to possibly reduce the number of elements they will have to page thru and allow the use of an on key field to exit the display array with a flag set to allow them to reset the query information. This can help reduce the query size. 3) You also perform the display of the data using the basic display command, keeping track of the size of the display area and what has been displayed onto the screen and have the user simply selection the line number (which you have on the screen (such as A-J or 1-0 (as in 10) as an input by name field on the screen. You can then set up an on key to allow them to scroll (via your display routine) two pages at a time if they wish. I wrote this kind of routine at a job four or so years ago at another job and have asked the current programmer to send me a copy of that routine via email and can mail it out to those wishing a copy of it as soon as I get it myself. I hope the above helps the original poster of this message. I did not see the original message having just recently obtained an INTERNET connection. Take care. -- ---------------------------------------------------------------------------- Clifton M. Bean Live and in Person in Saint Petersburg, Russia Grand Hotel Europe, #444 Employed by KPMG Peat Marwick (PEG), Wash, D.C. Saint Petersburg, Russia ------------------------------------------------ Voice: +7-812-119-6000 Snail Mail: P.O. Box 53 Fax: +7-812-119-6001/6003 SF-535 01 Lappeenranta, Finland ---------------------------------------------------------------------------- Current: clifton@clifbean.spb.su After Sept 30: clifton@egsner.cirr.com ----------------------------------------------------------------------------