home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.ingres
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!spool.mu.edu!uwm.edu!zazen!news
- From: heim@vms.macc.wisc.edu (JOHN HEIM )
- Subject: Re: Choice list for tablefield in 4GL
- Message-ID: <1993Jan28.164020.15361@macc.wisc.edu>
- Sender: news@macc.wisc.edu (USENET News System)
- Organization: University of Wisconsin Academic Computing Center
- Date: 28 JAN 93 10:02:23
- Lines: 41
-
- In article <1993Jan28.145042.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.
-
- Yeah, right after I posted the question I saw that the chapter on
- choice lists in the Language Reference Guide directs you to the
- Programmers Guide for an example of dynamic programming. I haven't
- looked at it yet though. (The index of the Programmers Guide doesn't
- mention it.)
-
- Thanks much.
-
- BTW, I guess I should be using a list field (not a option field). I
- think what you said above still works though, right?
-
- ------------------------------------------------------------------------------
- John G. Heim Internet: heim@macc.wisc.edu
- UW - Madison Academic Computing Center Phone: 608-262-9887
- 1210 W. Dayton St. Fax: 608-262-4679
- Madison, WI., 53706 CIS: 76376,3635
-