Introduction to PowerBuilder

HomePrevious Lesson: EditMask
Next Lesson: Tab Order

Code Tables

If you want to use spin controls with string-type data, you can make use of Code Tables. Code Tables work like look-up tables. That means, it allows you to display the detail value, for the corresponding abbreviation. For example, you may want to display "New York" on the screen, and store "NY" in the database whenever user selects "New York". All you need to do is provide "New York" for the "Display Value" property and "NY" for the "Data Value" property. You can provide as many entries as you want in this "Code Tables".

If you use Spin Control and CodeTables for the String data type values, PowerBuilder displays values from the code tables that is specified in the "display value", as the user keep clicking on the arrows in the "Spin Control".
HomePrevious Lesson: EditMask
Next Lesson: Tab Order