home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.ingres
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!rtech!ingres!jabbate
- From: jabbate@Ingres.COM (Joe M. Abbate)
- Subject: Re: Choice list for tablefield in 4GL
- Message-ID: <1993Jan28.223638.26152@pony.Ingres.COM>
- Summary: Can use Option, List, or Radio fields
- News-Software: VAX/VMS VNEWS 1.4-b1
- Keywords: Windows4GL
- Organization: ASK Computer Systems, Ingres Product Division
- References: <1993Jan28.145042.23125@pony.Ingres.COM> <1993Jan28.160140.8789@bmw.mayo.edu>
- Date: 28 Jan 93 22:36:38 GMT
- Lines: 53
-
- In article <1993Jan28.160140.8789@bmw.mayo.edu>, buntrock@mayo.edu writes...
-
- >In article 23125@pony.Ingres.COM, jabbate@Ingres.COM (Joe M. Abbate) writes:
- >>In article <1993Jan27.224636.6022@macc.wisc.edu>, heim@vms.macc.wisc.edu
- >>(JOH writes...
- >>
- >>>I have a column in a tablefield in Windows4GL that is a varchar. My
- >>>user needs to be able to choose from a list of values for the field.
- >>>There are a couple of 100 possible choices. What is the best way to
- >>>implement this?
- >>>
- >>>Right now I'm trying to set up an option field but the choices are in
- >>>a table in the DB and I don't see anyway to set up the option field
- >>>with the values in the table.
- >>
- >>An option list is a descendant (or subclass) of EnumField, so one
- >>of its attributes is ValueList, an object of type ChoiceList,
- >>which is an array of ChoiceItems. You can add ChoiceItems values
- >>(EnumText and EnumValue), inside a SELECT loop, either directly (by
- >>assignment) or by using the AddTextItem method of ChoiceList.
- >>Remember to call ChoiceItems.Clear() first and UpdChoiceList()
- >>after the loop (to update the display). The Language Reference
- >>Manual has an example in the System Classes chapter, under EnumField,
- >>and you can also look at the Purchase_order application in appendix D
- >>of the Application Editor User's Guide.
- >>
- >
- >The above procedure will work fine, however, when the option list is displayed
- >it forms a single vertical list. If you are working with more than say 20 items the
- >remaining items will be displayed off the screen. The user will have no way
- >of accessing the item they want. I am not sure if there is a way
- >around a single vertical list for the option field. If any one knows please
- >post? I have been using the tablefield as a fix.
-
- In a separate posting/e-mail exchange John Heim asked and I
- replied ...
-
- >>BTW, I guess I should be using a list field (not a option field). I
- >>think what you said above still works though, right?
- >
- >What I said works for all EnumFields: Radio fields, Option fields or
- >List fields. You can convert from one to the other from the Edit menu
- >in AppEd. What you choose depends on visual, space and ease-of-use
- >characteristics of your tablefield and frame. The option field only
- >occupies one "line", but when choosing the user will suddenly be
- >presented with a long list of choices. The list field may use more
- >lines, but provides a scrollbar to view the choices.
-
- Joe
- ----------------------------------------------------------------------
- Joe M. Abbate | First the tooth fairy, then the Easter Bunny,
- Ingres - Latin America | then Santa, finally _ _ _ .
- jabbate@ingres.com | Why do so many people not take that last step?
-