Supported Field Types

Documentation home

 

CHAR. 1

NUMERIC. 1

CURRENCY. 1

INTEGER. 2

BOOLEAN. 2

DATE. 2

TIME. 3

DATETIME. 3

 

 

See also:

FPL Script Command Syntax

Ebase Startup Parameters

 

 

CHAR

 

CHAR fields represent  character values. Any data can be entered.

 

FPL script considerations:

Addition operations on character fields are treated as concatenation. e.g.

 

set A = 'Happy'; 

set B = A + ' Xmas';

 

A and B are both defined as CHAR fields. B will contain the value 'Happy Xmas'.

 

Resource mapping considerations:

CHAR fields can be mapped to any character-type resource field type e.g. CHAR, VARCHAR, LONGVARCHAR etc, plus the TIME type.

 

 

NUMERIC

 

NUMERIC fields represent  numeric values with a specified number of decimal places. The number of decimal places attribute in the field properties dialog specifies the number of decimal places allowed.

 

Presentation considerations

Numeric fields are formatted according to the formatting language in use for the form being executed. Formatting commas and periods are inserted according to the formatting rules for the language. The formats can be viewed in the language properties dialog (Tools -> System Preferences -> Internationalization, then select a language and click Properties). Similarly, commas and periods can be entered by the end user.

 

FPL script considerations:

All mathematical operations are possible. (See FPL Script Command Syntax for more information). Rounding will be applied to the results of calculations as specified by the rounding options in the field properties dialog.

 

Resource mapping considerations:

NUMERIC fields can be mapped to any numeric-type resource field type e.g. NUMBER, DECIMAL, INTEGER, SMALLINT, FLOAT etc.

 

 

CURRENCY

 

Currency fields are treated the same as numeric fields except that the decimal places are always displayed to the end user. e.g. for a currency field with 2 decimal places, a value of 99 is displayed as 99.00, a value of 23.1 is displayed as 23.10 etc. The number of allowable decimal points defaults to 2 and can be changed if required. (See Numeric fields for more information)

 

 

INTEGER

 

INTEGER fields represent  numeric values with no decimal places.

 

Presentation considerations

Integer fields are formatted according to the formatting language in use for the form being executed. Formatting commas or periods are inserted according to the formatting rules for the language. The formats can be viewed in the language properties dialog (Tools -> System Preferences -> Internationalization, then select a language and click Properties). Similarly, commas or periods can be entered by the end user.

 

FPL script considerations:

All mathematical operations are possible. (See FPL Script Command Syntax for more information)

 

Resource mapping considerations:

INTEGER fields can be mapped to any numeric-type resource field type e.g. NUMBER, DECIMAL, INTEGER, SMALLINT, FLOAT etc. When reading in data from a mapped resource field with decimal points, the decimal points will be removed.

 

 

BOOLEAN

 

BOOLEAN fields can only have a value of 'Y' or 'N', and the default value is 'N'.

 

Presentation considerations

Boolean fields can only be displayed with a display type of checkbox. If a boolean checkbox field is marked as mandatory, a missing mandatory field message will be generated unless the checkbox is checked. This can be used to ensure a user clicks a checkbox e.g. "Click here to accept these conditions......".

 

FPL script considerations:

BOOLEAN fields can be queried as follows:

 

if [ A = 'Y']......

 

Resource mapping considerations:

BOOLEAN fields can be mapped to any character-type or bit-type resource field type e.g. CHAR, VARCHAR, BIT etc.

 

 

DATE

 

DATE fields represent  a date.

 

When a date value is specified in the Ebase designer e.g. as a date literal in a script (as shown below) or as a default value for a field, the format must correspond with the format specified in parameter Ufs.dateFormat in the Ebase Startup Parameters file.  

 

Presentation considerations

Date fields are formatted according to the formatting language in use for the form being executed. The formats can be viewed in the language properties dialog (Tools -> System Preferences -> Internationalization, then select a language and click Properties). Similarly, date fields entered by the end user should be in the same format.

 

FPL script considerations:

Mathematical operations on DATE fields can be performed.

 

set F1 = '01/04/2002' + 10;

 

will set the F1 field equal to 11/04/2002.

 

FPL functions:

 

addmonth

adds one or more months to a date

addweek

adds one or more weeks to a date

addyear

adds one or more years to a date

datepart

a string representing part of a date e.g. Wednesday, August etc

datetostring

converts a date field to a character field and optionally applies regionalized formatting

dayofweek

returns a string representing the day of the week e.g. Friday

formatdate

formats the date as a string e.g. Tue July 10, 1996

joindatetime

see DATETIME type

splitdate

see DATETIME type

 

See FPL Script syntax for more details on the use of these functions.

 

Resource mapping considerations:

DATE fields can be mapped to resource fields of type DATE (date, but not time) or TIMESTAMP (both date and time).

 

 

TIME

 

Time fields can be used to represent a time of day to an accuracy of one thousandth of a second. Ebase time fields are not affected by time zones i.e. a time value of 09:30 entered by an end user will always display with the value 09:30 even when the time zone of the operating system is changed. Similarly time fields transferred to databases or XML documents wil contain the value as entered by the end user and will not be adjusted for time zones.

 

Presentation considerations

The display of time fields is configured using the date/time field options (in the Presentation tab of Field Properties). Options are available to display time fields as format hh:mm, hh:mm:ss or hh:mm:ss.ttt.

 

By default, time fields are displayed as hh:mm:ss.ttt using a 24 hour clock, but note that the :ss.ttt portion is only displayed if the field contains a value other than zero e.g. a time field with value 10:30:00.000 will be displayed as 10:30, a time field with value 10:30:49.000 will be displayed as 10:30:49. 

 

Time fields can be entered as either hh:mm, hh:mm:ss, or hh:mm:ss.ttt. The entry of a time field is not affected by the display format.

 

The presentation and validation of time fields does not vary based on language.

 

FPL script considerations:

When mathematical operations are performed on TIME fields, all values are interpreted as a whole number of seconds.

 

e.g. to add 30 seconds to a time field:

 

set TIME1 = TIME1 + 30;

 

to add 30 minutes to a time field:

 

 set TIME1 = TIME1 + (30 * 60);

 

FPL functions:

 

joindatetime

see DATETIME type

splittime

see DATETIME type

timetostring

converts a time field to a character field

 

See FPL Script syntax for more details on the use of these functions.

 

Resource mapping considerations:

TIME fields can be mapped to resource fields of type TIME or TIMESTAMP. When mapped to a TIMESTAMP field (which contains both date and time)., the date portion of the TIMESTAMP is ignored.

 

 

DATETIME

 

Datetime fields can be used to represent a moment in time to an accuracy of one second. The moment in time consists of a date and a time. Ebase datetime fields are not affected by timezones and behave the same as TIME fields with regard to time zone considerations.

 

Presentation considerations

Datetime fields are displayed as a date part followed by a time part.

 

The date part is formatted as for DATE fields.

 

The time part is formatted as for TIME fields.

 

 

FPL script considerations:

When mathematical operations are performed on DATETIME fields, all values are interpreted as a whole number of seconds.

 

e.g. to add 30 seconds to a datetime field:

 

set DATETIME1 = DATETIME1 + 30;

 

to add 30 minutes to a datetime field:

 

 set DATETIME1 = DATETIME1 + (30 * 60);

 

FPL functions:

 

A DATETIME field can be split into its date and time components using the splitdate and splittime functions e.g.

 

set DATE1 = splitdate(DATETIME1);

set TIME1 = splittime(DATETIME1);

 

where DATE1 is a field of type DATE and TIME1 is a field of type TIME.

 

Similarly a DATETIME field can be created from a DATE and a TIME field using the joindatetime function e.g.

 

set DATETIME1= joindatetime(DATE1, TIME1);

 

These functions are intended to allow TIMESTAMP resource fields (which contain both date and time) to be retrieved from a database or XML document, split into their constituent date and time parts for display to the end user, then re-combined for update of the database or XML document.

 

See FPL Script syntax for more details on the use of these functions.

 

Resource mapping considerations:

DATETIME fields can be mapped to resource fields of type DATE, TIME or TIMESTAMP. When mapped to a DATE field,  the time portion is set to 00:00:00 on write operations to a resource. When mapped to a TIME field, the date portion is set to the current date on write operations to a resource.