Type

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.

 

Text

Time

Numeric String

Sequenced ID

Number

Choice List

Currency

Yes/No

Date

Memo

 

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.

 

Text

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.

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:

However, we recommend that you do not add a Fast Text Index to a Text field that you:

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.

 

Numeric String

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:

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.

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:

However, we recommend that you do not add a Fast Text Index to a Numeric String field that you:

 

Number

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.

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.

 

Currency

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.

 

Date

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.

 

Time

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.

 

Sequenced ID

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.

 

Choice List

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.

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

  1. Choose Choice List as the Data Type on the Field Definition dialog.

  2. 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.

  3. DataEase adds the last choice entered at the end of the list.

  4. Type a List Name for the Choice List.

  5. Specify the Visual Control for the field.

 

Yes/No

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.

 

Memo

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

... 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.