Navigation: User's Guide and Tutorials > The Dictionary > Dictionary Editor >====== Lesson 3 - Column Properties ====== | |
Lesson Tasks:
Explore and understand the Column Properties options.
Due to the amount of options available through Column Properties, the Validity Checks, Window, and Report options are discussed in the Advanced Features lesson.
Overview
Columns are added to the dictionary in the same manner as tables. There are two ways to add columns to any table.
1. From the Quick View Fields window, press the Add button on the Fields toolbar. You can also press the INSERT key in this window.
When adding columns to a new table, the list boxes on this screen are initially empty.
2.Double-clicking on any table in the DCT Explorer opens the Entity Browser.
From this window, select the Columns folder, and press the Add button on the Entity Browser toolbar.
Column Properties Summary
The Column Properties window allows the characteristics of each defined column to be specified. It contains a number of options that allow you to specify particular information about a column. An explanation of some key options shown in the Column Properties window follows:
Column Name
The label (name) to be used when referring to this control from within the application. Up to 80 characters may be entered in this screen for the control label. As with all Clarion labels, the control label may consist of alphabetic characters, numbers, the underscore character (_), and the colon ( : ). Labels may not contain spaces, may not begin with a number or a colon, and are not case sensitive.
Derived From
Press the ellipsis button (…) to select another (parent) field in the dictionary from which to copy all field attributes, except the field name. The parent field may be any other field in the data dictionary, including global data fields, field pool fields, or file fields.
Press the refresh button to reapply the attributes from the parent field. Use the Freeze check box below to prevent a refresh from the parent. See also the Refresh Field, Refresh File, Refresh Dictionary, and Distribute Field menu commands
Description
Descriptions are a string of characters used to fully describe the type of information stored in this control. If the Control Label specified is somewhat cryptic, it is a good idea to enter a meaningful description. Information entered in the Description column is treated as a comment. Very long descriptions may be entered by using the double-arrow button at the end of this control.
Data Type
The data type for the control. The following data types are supported: String, Memo, Picture, Cstring, Pstring, Byte, Short, Ushort, Long, Ulong,Date, Time, Sreal, Real, BFloat4, Bfloat8, Decimal, Pdecimal and Group. For the characteristics of each data type, refer to the Declaring Variables chapter of the Language Reference. The data types available are database driver dependent.
Base Type
Enter the label of a previously declared GROUP or QUEUE structure from which it will inherit its structure. This setting is only active during GROUP, LIKE, or TYPE data types.
Characters
Used for the string and decimal data types to specify the maximum number of characters that may be entered into this control.
Places
Used with the decimal and floating point data types to specify the number of decimal place to be associated with a number.
Binary
This checkbox only appears in conjunction with Memo data types to indicate that it will be used to store binary information like graphical images.
Dimensions
Allows multiple copies of a control to be defined. A control with dimensions is called an array. The individual copies of the control are called elements. Elements of an array are referred to through the use of subscripts. For example, if the number 10 is entered in the dimensions column, 10 copies of the control are created. This copies are referred to as column[1] … column[10]. Arrays are a shorthand way of creating multiple copies of a control.
RowPicture
Used with the PICTURE data type. It is a picture that indicates how stored data is formatted. For example, if a date is stored in a table as 10/22/92, it would be defined as a PICTURE type and the Record Picture would be @D1. This data could subsequently be displayed with a different picture by specifying an appropriate Display Picture.
Screen Picture
Screen Picture allows a formatting mask (picture type) for a column to be specified.
Prompt Text
The default prompt is the value used for the string prompt for a control when it is placed (or populated) on a window.
Column Heading
The default column heading for this control is entered here. The default column heading may be used when the control is placed on reports in the Application Generator.
Column Attributes Summary
Attributes reference such entry characteristics as the case of characters entered into the control, the way the cursor functions in a control, and how characters will be echoed to the screen.
Case
The Case radio button options control the alphabetic case of the information entered into a control.
Normal
The case of the characters entered should not be modified by the program.
Word Capitalized
This mode specifies that the first letter of each word should be an uppercase character and all other characters entered should be lowercase characters. The program will convert the case of characters entered if necessary.
Uppercase
Only uppercase characters are allowed in this control. The program will change characters to uppercase if necessary.
Typing Mode
Radio buttons that allow the Typing Mode to be specified.
Set Insert
For string controls, causes entry to work in a manner similar to a word processor in insert mode. If information is being entered into a control already containing data, the original data is “pushed” to the right until the size limit of the control has been reached.
For numeric controls, this mode causes the column to be filled from right to left, calculator style. This is the recommended mode for numeric controls containing information that varies greatly in length, such as controls containing currency data.
Set Overwrite
This mode causes a destructive overwrite if information is entered into a control already containing data. For numeric columns, this mode also specifies that numbers are to be entered from left to right.
Do Not Reset
Specifies that the typing mode should not be changed for this control. The typing mode used will be the typing mode “left over” from a previous setting of the typing mode.
Flags
These are checkboxes that allow entry attributes for a control to be specified.
Immediate
Immediate specifies immediate event notification for controls referencing this column. If you check the Immediate box. The Application Generator adds the IMM attribute.
Password
This attribute specifies that the information entered into this control should be “hidden”. As characters are entered into this column, asterisks ( * ) are echoed back to the screen for each character typed. This attribute is chosen for columns requiring sensitive data (i.e. passwords) to be entered.
Read Only
This attribute specifies the column should be Display Only, not allowing data entry into this control.
Justification/Offset
Allows for alignment justification along with indentation parameters to be specified for the column (control).
Place Over
Allows the column definition for the column being defined to redefine another column definition giving the ability to look at the same data in two different ways. Notice that a down arrow appears to the immediate right of this column. The down arrow indicates that a list is available to choose from. If the down arrow is chosen, a window will appear presenting a list of columns which may be overlaid with this column definition.
External Name
The name of the control within the data table may be different from the name used to refer to that control within the program (column label). If so, the name of the control as it exists in the data table should be entered here.
Initial Value
This column is used to “pre-load” a control with a particular value. For example, if a column named COUNTRY was being defined, a default value of USA might be specified.
Part II of the Column Properties features is covered in Lesson 8 - Advanced Features