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

  1. Newsgroups: comp.databases.ingres
  2. Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!rtech!ingres!jabbate
  3. From: jabbate@Ingres.COM (Joe M. Abbate)
  4. Subject: Re: Choice list for tablefield in 4GL
  5. Message-ID: <1993Jan28.223638.26152@pony.Ingres.COM>
  6. Summary: Can use Option, List, or Radio fields
  7. News-Software: VAX/VMS VNEWS 1.4-b1  
  8. Keywords: Windows4GL
  9. Organization: ASK Computer Systems, Ingres Product Division
  10. References: <1993Jan28.145042.23125@pony.Ingres.COM> <1993Jan28.160140.8789@bmw.mayo.edu>
  11. Date: 28 Jan 93 22:36:38 GMT
  12. Lines: 53
  13.  
  14. In article <1993Jan28.160140.8789@bmw.mayo.edu>, buntrock@mayo.edu writes...
  15.  
  16. >In article 23125@pony.Ingres.COM, jabbate@Ingres.COM (Joe M. Abbate) writes:
  17. >>In article <1993Jan27.224636.6022@macc.wisc.edu>, heim@vms.macc.wisc.edu
  18. >>(JOH writes...
  19. >>
  20. >>>I have a column in a tablefield in Windows4GL that is a varchar.  My 
  21. >>>user needs to be able to choose from a list of values for the field.  
  22. >>>There are a couple of 100 possible choices.  What is the best way to 
  23. >>>implement this?
  24. >>> 
  25. >>>Right now I'm trying to set up an option field but the choices are in 
  26. >>>a table in the DB and I don't see anyway to set up the option field 
  27. >>>with the values in the table.
  28. >>
  29. >>An option list is a descendant (or subclass) of EnumField, so one
  30. >>of its attributes is ValueList, an object of type ChoiceList,
  31. >>which is an array of ChoiceItems.  You can add ChoiceItems values
  32. >>(EnumText and EnumValue), inside a SELECT loop, either directly (by
  33. >>assignment) or by using the AddTextItem method of ChoiceList.
  34. >>Remember to call ChoiceItems.Clear() first and UpdChoiceList()
  35. >>after the loop (to update the display).  The Language Reference
  36. >>Manual has an example in the System Classes chapter, under EnumField,
  37. >>and you can also look at the Purchase_order application in appendix D
  38. >>of the Application Editor User's Guide.
  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. In a separate posting/e-mail exchange John Heim asked and I
  48. replied ...
  49.  
  50. >>BTW, I guess I should be using a list field (not a option field).  I 
  51. >>think what you said above still works though, right?
  52. >
  53. >What I said works for all EnumFields: Radio fields, Option fields or
  54. >List fields.  You can convert from one to the other from the Edit menu
  55. >in AppEd.  What you choose depends on visual, space and ease-of-use
  56. >characteristics of your tablefield and frame.  The option field only
  57. >occupies one "line", but when choosing the user will suddenly be
  58. >presented with a long list of choices.  The list field may use more
  59. >lines, but provides a scrollbar to view the choices.
  60.  
  61. Joe
  62. ----------------------------------------------------------------------
  63. Joe M. Abbate            | First the tooth fairy, then the Easter Bunny,
  64. Ingres - Latin America   | then Santa, finally _ _ _ .
  65. jabbate@ingres.com       | Why do so many people not take that last step?
  66.