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

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!UB.com!pacbell.com!ames!agate!usenet.ins.cwru.edu!gatech!swrinde!emory!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!bru!miracle!buntrock
  3. From: buntrock@mayo.edu (Jim Buntrock)
  4. Subject: Re: Choice list for tablefield in 4GL
  5. Message-ID: <1993Jan28.160140.8789@bmw.mayo.edu>
  6. Sender: newsman@bmw.mayo.edu (Usenet News Administrator)
  7. Reply-To: buntrock@mayo.edu
  8. Organization: Mayo Foundation
  9. References: <1993Jan28.145042.23125@pony.Ingres.COM>
  10. Date: Thu, 28 Jan 93 16:01:40 GMT
  11. Lines: 46
  12.  
  13.  
  14. ---
  15. In article 23125@pony.Ingres.COM, jabbate@Ingres.COM (Joe M. Abbate) writes:
  16. >In article <1993Jan27.224636.6022@macc.wisc.edu>, heim@vms.macc.wisc.edu
  17. >(JOH writes...
  18. >
  19. >>I have a column in a tablefield in Windows4GL that is a varchar.  My 
  20. >>user needs to be able to choose from a list of values for the field.  
  21. >>There are a couple of 100 possible choices.  What is the best way to 
  22. >>implement this?
  23. >> 
  24. >>Right now I'm trying to set up an option field but the choices are in 
  25. >>a table in the DB and I don't see anyway to set up the option field 
  26. >>with the values in the table.
  27. >
  28. >An option list is a descendant (or subclass) of EnumField, so one
  29. >of its attributes is ValueList, an object of type ChoiceList,
  30. >which is an array of ChoiceItems.  You can add ChoiceItems values
  31. >(EnumText and EnumValue), inside a SELECT loop, either directly (by
  32. >assignment) or by using the AddTextItem method of ChoiceList.
  33. >Remember to call ChoiceItems.Clear() first and UpdChoiceList()
  34. >after the loop (to update the display).  The Language Reference
  35. >Manual has an example in the System Classes chapter, under EnumField,
  36. >and you can also look at the Purchase_order application in appendix D
  37. >of the Application Editor User's Guide.
  38. >
  39.  
  40. The above procedure will work fine, however, when the option list is displayed
  41. it forms a single vertical list.  If you are working with more than say 20 items the
  42. remaining items will be displayed off the screen.  The user will have no way
  43. of accessing the item they want.  I am not sure if there is a way 
  44. around a single vertical list for the option field.  If any one knows please
  45. post?  I have been using the tablefield as a fix.
  46.  
  47.  
  48. ///////////////////////////////
  49. James Buntrock
  50. Analyst/Programmer
  51. Medical Information Resources
  52. Mayo Clinic
  53. 200 First Street SW
  54. Rochester, MN 55905
  55. email - buntrock@mayo.edu
  56. ///////////////////////////////
  57.  
  58.  
  59.