home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / ingres / 2382 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.4 KB  |  52 lines

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!spool.mu.edu!uwm.edu!zazen!news
  3. From: heim@vms.macc.wisc.edu (JOHN HEIM    )
  4. Subject: Re: Choice list for tablefield in 4GL
  5. Message-ID: <1993Jan28.164020.15361@macc.wisc.edu>
  6. Sender: news@macc.wisc.edu (USENET News System)
  7. Organization:  University of Wisconsin Academic Computing Center
  8. Date: 28 JAN 93 10:02:23    
  9. Lines: 41
  10.  
  11. In article <1993Jan28.145042.23125@pony.Ingres.COM>, jabbate@Ingres.COM (Joe M. Abbate) writes...
  12.  
  13. >In article <1993Jan27.224636.6022@macc.wisc.edu>, heim@vms.macc.wisc.edu
  14. >(JOH writes...
  15. >>I have a column in a tablefield in Windows4GL that is a varchar.  My 
  16. >>user needs to be able to choose from a list of values for the field.  
  17. >>There are a couple of 100 possible choices.  What is the best way to 
  18. >>implement this?
  19. >> 
  20. >>Right now I'm trying to set up an option field but the choices are in
  21. >>a table in the DB and I don't see anyway to set up the option field 
  22. >>with the values in the table.
  23. >An option list is a descendant (or subclass) of EnumField, so one
  24. >of its attributes is ValueList, an object of type ChoiceList,
  25. >which is an array of ChoiceItems.  You can add ChoiceItems values
  26. >(EnumText and EnumValue), inside a SELECT loop, either directly (by
  27. >assignment) or by using the AddTextItem method of ChoiceList.
  28. >Remember to call ChoiceItems.Clear() first and UpdChoiceList()
  29. >after the loop (to update the display).  The Language Reference
  30. >Manual has an example in the System Classes chapter, under EnumField,
  31. >and you can also look at the Purchase_order application in appendix D
  32. >of the Application Editor User's Guide.
  33.  
  34. Yeah, right after I posted the question I saw that the chapter on 
  35. choice lists in the Language Reference Guide directs you to the 
  36. Programmers Guide for an example of dynamic programming.  I haven't 
  37. looked at it yet though.  (The index of the Programmers Guide doesn't 
  38. mention it.)  
  39.  
  40. Thanks much.
  41.  
  42. BTW, I guess I should be using a list field (not a option field).  I 
  43. think what you said above still works though, right?
  44.  
  45. ------------------------------------------------------------------------------
  46. John G. Heim                                   Internet: heim@macc.wisc.edu
  47. UW - Madison Academic Computing Center         Phone:    608-262-9887
  48. 1210 W. Dayton St.                             Fax:      608-262-4679
  49. Madison, WI., 53706                            CIS:      76376,3635
  50.