9. Generating Fields from Predefined Templates : How You Can Add a Generated Field to a Frame : The spin_control Field Template : How You Can Specify Spin Control Values
 
Share this page                  
How You Can Specify Spin Control Values
There are five different types of spin controls that you can choose:
Integer
Float
Money
Date
ChoiceList (varchar)
For the first four types, the following fields appear in the Assistant window:
Initial Value
Specifies the value that is initially displayed in the field
Minimum Value
Specifies the lowest value that is displayed in the field
Maximum Value
Specifies the highest value that is displayed in the field
Increment Value
Specifies the amount that the value is incremented or decremented when the user clicks the up or down arrow button
The ChoiceList type automatically makes use of the Standard List 4GL procedure. (For more information, see the StdList function in the Language Reference Guide.) If you select ChoiceList as the Spin Control Type, the following choices are available:
List Type
Specifies the type of list to be created:
Weekdays
Lists weekday names (1–7, Sunday to Saturday)
Months
Lists month names (1–12, January to December)
States
Uses a predefined list of U.S. states (1–50, Alabama to Wyoming)
Query
Lists unique values from a specified table and column (row 1 through n, the maximum number of rows). When this option is chosen, the following fields appear:
Table Name
Specifies the variable name for the table to be used
Column Name
Specifies the variable name for the column to be used
Custom Name
Lists your own list of values
Note:  When you use this option, take care that the list you provide is valid. Its values must be of the varchar data type and must be unique.
List Name
Specifies a variable name for the list
Initial Value
Specifies the index value of the initial selection in the list