When you click on Type (the default), DataEase lets you specify the Data Type and its associated options.
Data Type
lets you specify the type of data (e.g., Text, Number, Choice List) that you want to store in the field. Text is the default Data Type. To select a different Data Type, click on the button beside the desired Field Type.
Each Data Type is described in detail below.
Visual Control
lets you specify the appearance of the field on the form (e.g., EditBox, RadioBox, Spin). The field's Data Type determines which Visual Controls you can select. EditBox is the most common type of Visual Control.
Each Visual Control is described in detail later in this chapter after the explanation of Data Types.
A Text field stores and displays descriptive information such as a name or address. The maximum length of a Text field is 255 characters.
Characters Allowed in a Text Field
DataEase accepts all alphanumeric (and ANSI) characters in a Text field, except the three DataEase wild card characters (*, ?, and ~).
Visual Control
DataEase lets you display a Text field in two ways.
EditBox - displays alphanumeric values in a rectangular field.
ImageField - accepts an image filename and displays graphic data during User View.
NOTE: You can include a pathname directly in the ImageField(e.g., C:\EMPLOYEE\BMPS). If you do not specify a pathname, DataEase searches the directories specified in the Image Search Path on the Application Preferences dialog.
Fast Text Index
Lets DataEase find matching records quickly and reduces the size of the index file. We recommend that you add a Fast Text Index to a Text field longer than six characters that you:
Frequently search for an exact matching value (by using the equal to {=} operator).
Use as a Match field in a relationship.
However, we recommend that you do not add a Fast Text Index to a Text field that you:
Frequently search for a range of values (by using operators such as between to, greater than, etc.).
Use to sort records.
NOTE: A Text field can contain letters, numbers, or a combination of both. ZIP CODE (above) can be a Text field or a Numeric String field.
A Numeric String field stores and displays numbers used for identification only (i.e., numbers that are not used for calculations). DataEase fills or pads an incompletely filled Numeric String field with leading zeros. The maximum length of a Numeric String field is 255 digits.
Types of Numeric String Fields
DataEase lets you define two types of Numeric String fields:
Predefined - select a Formatted String Option from the list of seven formats DataEase displays in the drop-down list box.
Custom - create a custom format by typing a nine (9) or zero (0) for each digit position and, optionally, the exact punctuation marks or formatting characters (such as dashes) you want.
You can turn off the automatic padding in Numeric String fields on the Document Properties dialog.
Although a Numeric String value is not designed for calculations, a DQL mathematical function can be used on it (e.g., floor).
DataEase automatically converts the first (leftmost) 14 digits to a Floating Point Number and returns the first 14 digits of the result. Any other digits are truncated.
Visual Control
DataEase lets you display a Numeric String field in two ways.
EditBox - displays alphanumeric values in a rectangular field.
SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.
Fast Text Index
Lets DataEase find matching records quickly and reduces the size of the index file. We recommend that you add a Fast Text Index to a Numeric String field longer than six digits that you:
Frequently search for an exact matching value (by using the equal to {=} operator).
Use as a Match field in a relationship.
However, we recommend that you do not add a Fast Text Index to a Numeric String field that you:
Frequently search for a range of values (by using operators such as between to, greater than, etc.).
Use to sort records.
A Number field stores and displays a numeric value that can be used in calculations. The maximum length for a Number field is 14 digits.
Types of Number Fields
DataEase lets you define three types of Number fields differentiated by the location of the decimal point.
Integer - contains only whole numbers (no decimal point). Choose None in the Decimals list box.
Floating Point - lets you specify the location of the decimal point by pressing the decimal key (.) in User View. Choose Float in the Decimals list box.
Fixed Point - lets you predefine the number of digits to the left and right of the decimal point. Choose the number of digits to the right of the decimal from the Decimals list box.
For Integer and Fixed Point fields, DataEase automatically adds a comma after every third digit.
By default, DataEase displays the comma (,) as the 1000 separator. To change the default, select International from the Windows Control Panel.
The decimal point (.) and negative sign (-) each take up one digit in a Number field. When you define a Number field, be sure to allow room for a decimal and the negative symbol.
Visual Control
DataEase lets you display a Number field in two ways.
EditBox - displays alphanumeric values in a rectangular field.
SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.
A Currency field value stores and displays a monetary amount that can be used in calculations. The maximum length for a Currency field is 14 digits.
Decimals in a Currency Field
A Currency field is a Fixed Point Number field that has either zero or two digits to the right of the decimal point.
Currency Format Options
DataEase uses the Currency format currently set in the Windows' Control Panel by default (e.g., 2 digits to the right of the decimal if you're using Window's North American Currency format). To change the number of decimal digits, select International>>Currency Format from the Windows Control Panel.
Visual Control
DataEase lets you display a Currency field in two ways.
EditBox - displays alphanumeric values in a rectangular field.
SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.
A Date field stores and displays a calendar date. You have a choice of two Date formats - Standard and Extended. A Standard Date field has a length of 8 digits (6 numbers plus 2 slashes, e.g. 01/02/98). An Extended Date field has a length of 10 digits (8 numbers and 2 slashes, e.g. 01/02/1998).
Date Format Options
DataEase uses the Short Date format currently set in the Windows' Control Panel by default (e.g., month/day/year expressed in the form 12/26/94 if you're using Windows' North American Short Date field format). To change the default format to the International or Metric format, select International>>Date Format from the Windows Control Panel.
Visual Control
DataEase lets you display a Date field as an EditBox. An EditBox displays alphanumeric values in a rectangular field.
NOTE: To make DataEase display the current date in a Standard Date field, enter ??/??/?? or lookup current date as the Derivation Formula.
In an Extended Date field, you should use the formula Current Date.
A Time field stores and displays a clock numerical value. The length of a Time field is always 8 digits (6 numbers plus 2 colons).
Time Format
DataEase always uses 12-hour Time field format.
NOTE: You can define a Choice field to specify AM and PM.
Time Calculations
You can perform calculations on Time fields. If you add or subtract a time and an integer (e.g., TIME + 120), the result is a Time value. The integer is treated as a number of seconds (120 seconds in the example above). If you subtract one time from another, the result is an integer (representing the number of seconds).
Visual Control
DataEase lets you display a Time field as an EditBox. An EditBox displays alphanumeric values in a rectangular field.
NOTE: To make DataEase display the current time in a field, enter ??:??:?? or lookup current time as the Derivation Formula.
A Sequenced ID field stores and displays an automatically incremented value. The maximum length for a Sequenced ID field is 255 characters. We recommend that you assign the Prevented attribute to each Sequenced ID field.
Assigning a Starting Value
DataEase assigns the Starting Value you specify to the first record entered in User View. The field value in each subsequent record is automatically incremented by 1.
How DataEase Increments a Sequence
Numbers increase in value from 0 to 9 and letters increase A to Z. When a character reaches its limit, DataEase resets the character, and increases the value of the character to its left by one.
Visual Control
DataEase lets you display a Sequenced ID field in two ways.
EditBox - displays alphanumeric values in a rectangular field.
SpinBox - displays numeric values. Type in a value or use the vertical arrow controls to display a value.
A Choice List field displays a list of predefined values in User View. The advantages of using Choice List fields are:
Significantly reduced disk space - DataEase stores each choice as a number, not as a text string.
Faster and more accurate record entry - users can only choose values that you define.
Choice List Limits
DataEase lets you define up to 99 choices of up to 60 characters each for each Choice List field.
Visual Control
DataEase lets you display a Choice List field in two ways.
RadioBox - displays choices as radio buttons.
ListBox - displays choices in a drop-down list.
TIP: To use the options that appear in another Choice List field in the list you are currently defining, just type its name in the LIST NAME field.
Modifying a Choice List
DataEase displays the following prompt when you modify a Choice List:
Update data with new choice list?
Answer Yes if you change the order of the choices, or if you add or delete a choice from the list. Answer No if you only change the text (e.g., change Golfing to Golf).
How to Define a Choice List Field
Choose Choice List as the Data Type on the Field Definition dialog.
To add a choice to the list, type the text for the first choice as you want it to appear on the screen. Click Add.
DataEase adds the last choice entered at the end of the list.
Type a List Name for the Choice List.
Specify the Visual Control for the field.
A Yes/No field is a Choice List field that accepts only Yes and No values. The length of a Yes/No field is always 3 digits.
Visual Control
DataEase lets you display a Yes/No field in three ways.
ListBox - displays choices in a drop-down list.
CheckBox - displays choices in a single box that toggles between no (unselected) and yes (selected). The default is no. When you choose CheckBox, DataEase displays the Field Name as the caption to the right of the checkbox.
RadioBox - displays choices as radio buttons.
In DataEase 7, Memo Fields are implemented as CLOBs (Character Large Objects). Memo Fields can contain up to 64k characters. It is not necessary to size them, since they are held as variable length records.
Notes
Due to their large size, Memo Fields can not be set to Indexed or Unique, and they should not be used in Relationships.
When typing data into a Memo Field, use Shift>>Carriage Return to force a New Line. (Carriage Return will just move you to the next field in the form).
Although you may assign several Memo fields to one Table, you should do so with caution. Manipulating such large files may have an impact on performance.
Memo fields are not part of a DataEase Tables .DBM file in other words they exist as separate files, and are not part of the normal data file. Ideally they should be used to hold discrete items of information data which adds to the usefulness of the record - rather than being part of the record. Examples would include:
Complete Case Notes
Relevant Legal Documents
Associated Sales or Marketing Materials
Technical Specifications
... and so on.
Visual Control
DataEase lets you display a Memo field as an EditBox (only). An EditBox displays alphanumeric values in a rectangular field.