Table Fields

This sublist is where you create and manage the data class' table or view fields. Saving the field records stores not only the field objects but also the table field relations, which means that the fields can also be used in masks.

Field Name name of the table field
Sequence field's numerical position in the table
Type data type and length of a field
F foreign key flag
Sorting sort type, for queries to the field
Group group
Path name of the original table field for a view field
Index 1-3 the field's index
Unique 1-3 uniqueness flag
Languages language list
Mode search mode
Non-Null non-null flag
Field Title field's title in masks
Description verbose description of a field
Check String string for validating user-entered data
Default Value provides a default value for the field

Form opens the selected record in the form
Mask Assignments shows a field's usage in masks

Name

Name of the table or view field

attribute master attribute for field (T_FIELD)
type, entry string, no special characters, specification required
max. no. of characters 50
selection tool no
multilingual field no

The field's name identifies the field object uniquely.

Syntax:

TABLENAME.COLUMNNAME -or- VIEWNAME.COLUMNNAME

When you create a new field, the TABELLENNAME/VIEWNAME from the header is inserted automatically. You only need to add the COLUMNNAME.

Note! Once the database table or view has been created and the field (if new) exists as an object, its name can no longer be changed. To do this, you need to delete the field record, create it again, and then recreate or modify the table or view.

Sequence

A field's numerical position in a table or view

attribute master attribute for field (T_FIELD)
type, entry integer, entry required
max. no. of characters 5
selection tool no
multilingual field no

The numerical position of a field determines the sequence of fields in the database table or view.

DataView needs the numerical position to determine the field order when creating default masks. This sequence has no meaning within the database table or view itself.

Type

Data type and length of a table or view field

attribute master attribute for field (T_FIELD)
type, entry string, no special characters, entry required
max. no. of characters 6
selection tool menu with all data types
multilingual field no

Syntax:

TYPE and LENGTH, without a separating space, e.g. S

Entry:

B -> Binary
BLOB (Binary Large Object) field. This type of field can hold binary data directly, and its length need not (cannot) be defined a priori.

More information: -> BLOB fields

C -> Calculation
Calculation field. These fields display database independent information in masks, and are only considered when the model object creates its default masks.

More information: -> Calculation fields

D -> Date
Date fields can hold dates and times, e.g. .. ::. The date format (nationality) for masks can be set using the default variable DATEFORMAT, and the database format depends on the attached database itself. The field length cannot be predetermined (although the internal default is bytes).

More information: -> Date fields

F -> Real
Real fields hold fixed-point decimal numbers, e.g. 0. or -0.. The default is F.3 ( = places before the point, 3 = places after the point), and the data can also be displayed exponentially, e.g. 3.e-2. You can enter data using a decimal point or comma, and this will be auto-corrected.

I -> Integer
E.g. 0 oder -0. The default is I.

L -> Logical
Field of the Boolean type. It can only take the values ON, OFF or EMPTY. No length specification is possible.

M -> Money
Money fields hold values as currency, e.g. $0.. The default is M,2 ( = places before the point, 2 = places after the point). You can enter data using a decimal point or comma, and this will be auto-corrected.

S -> String
You can enter text into string fields in 8-Bit ASCII format. The default is S. String fields longer than 255 characters are defined as longtext fields.

More information: -> Longtext fields

The system's default lengths are applied when you leave the field, and you can also use default variables to set your own defaults.

Foreign Key (flag)

Only used for foreign tables or views

attribute master attribute for field (T_FIELD)
type, entry logical
max. no. of characters 1
selection tool no
multilingual field no

Entry:

Not set (default):
The field is not a foreign field

Set (field must be indexed)
The field is a foreign field

If you set the Foreign Key flag, DataView uses the field to identify records in a foreign format table. You must have at least one Foreign Flag key, but you may also use several fields together as a combined key.

Foreign Key fields should be defined as indexed (-> Field index), unique (-> Uniqueness flags) and not null (-> Non-Null flags).

More information: -> Foreign Format Tables

Sorting

Sort type, for queries to the field

attribute relation attribute for table field (T_FIELD)
type, entry numeric
max. no. of characters 5
selection tool no
multilingual field no

The Sort type determines the order of the records returned after a query DataView sorts fields of type integer, real and money numerically, and string fields alphabetically.

Entry:

n
numerical or alphabetical sort in ascending order

-n
numerical or alphabetical sort in descending order

0
no sort

n determines the field's priority when sorting by more than one field. 1 has the highest priority.

Example: Field A: n = 1, Field B: n = -2 -> DataView sorts the records according to field A in ascending order. If there is more than one record where field A is identical, DataView sorts these records according to field B in descending order.

Group

Groups only apply in views

attribute master attribut for field (T_FIELF)
type, entry logic
max. no. of characters 1
selection tool no
multilingual field no

You need to define groups when your view query contains evaluations, such as counts, averages or sums.

More information: -> Grouping

Path

Name of the original table field for a view field (views only)

attribute master attribut for field (T_FIELD)
type, entry string, no special characters, entry required
max. no. of characters 255
selection tool no
multilingual field no

This holds the name of a view field's base field. Base fields are real table fields in the database. If several views have been "stacked" on one another, the complete path to the base field is given.

Syntax:

TABLENAME.COLUMNNAME>VIEWNAME1.COLUMNNAME>... >VIEWNAMEn.COLUMNNAME

Formula strings (incl. group functions SUM(), AVG(), MIN(), MAX(), CONT() or statistical functions STDDEV(), VARIANCE()) are permitted, and should be entered in SQL syntax. When the view is generated, they are saved to the database without being validated.

More information: -> View fields

Index 1-3

Index for table fields

attribute master attribut for field (T_FIELD)
type, entry string, no special characters, entry optional
max. no. of characters 13
selection tool no
multilingual field no

Using indices makes looking up the field in the database faster. Looking up several fields can be speeded up by assigning all the fields the same index.

Syntax:

TABLENAME_INDEXNAME

Multilingual fields cannot be indexed.

More information: -> Indexed fields

Unique 1-3

Uniqueness flag

attribute master attribut for field (T_FIELD)
type, entry string, entry required
max. no. of characters 1
selection tool menu with all uniqueness flags for master tables
multilingual field no

If the flag is set, DataView saves the field's contents as unique, which means that every record in the table is identified uniquely. If you use the field in masks, altering the data in an existing field will generate an error message.

You should flag fields as unique whenever they are responsible for uniquely identifying records, in particular:

Entry:

G -> globally unique
All records in the master table are unique

- -> not unique (default)

Only indexed fields can be unique.

More information: -> Unique fields

Languages

Language list for table or view fields

attribute master attribute for field (T_FIELD)
type, entry string, entry required
max. no. of characters 40
selection tool menu with all available languages
multilingual field yes

You can define the languages supported by each multilingual field. The languages field holds a comma-separated list of language keys. Using the menu, you can either select the entire default language list or select one or more language keys individually. When DataView generates the table or view, it also creates the appropriate number of field objects internally, to hold text in various languages. These internal field names are always formed by adding a language key as suffix, e.g. TABLENAME.COLUMNNAME_LNG or VIEWNAME.COLUMNNAME_LNG.

Attention! It is not possible to directly delete single language entries in the language field. Instead, you must select the "Clear Entry" command from the context menu and then select the languages you want to support for multilingual fields.

Syntax:

LNG1, LNG2, ..., LNGn

Multilingual fields cannot be indexed.

Attention! When using views, please note that the language list of a multilingual field may hold fewer language keys than are held in the base field, but may not hold any which are different.

More information: -> Language management

Mode

Search mode for a table field.

attribute master attribute for field (T_FIELD)
type, entry string
max. no. of characters 1
selection tool menu with all search modes
multilingual field no

Entry:

(empty)
no case sensitivity (default)

I -> insensitive
alphabetical case is ignored

S -> sensitive
alphabetical case is considered

If a field's case sensitivity is defined, the case sensitivity set in the default variable QUERYMODE is ignored for that field.

Non-Null (NN)

Non-null (non-zero) flag

attribute master attribute for field (T_FIELD)
type, entry logical
max. no. of characters 1
selection tool no
multilingual field no

Of the flag is set to Non-Null, it must hold an entry in the database table. If the field is used in a mask, an entry is forced by setting the field's Access for the mask's Edit Mode to m = mandatory.

The Non-Null flag should be set for every field which provides a record's unique ID, in particular:

Entry:

not set (default)
a NULL entry is possible

set
an entry is forced (field's Access is m = mandatory)

Title

A field's title in masks

attribute master attribute for field (T_FIELD)
type, entry string, entry optional
max. no. of characters 50
selection tool no
multilingual field yes

Field titles are crucial in integrating graphics and images into forms.


Field Titles

In lists, the title is a field's column label, displayed in the lists header. In forms, the title can be positioned anywhere relative to the field.

More information: -> Field titles


Graphics (forms only)

When you use this field in forms, you can insert a graphic or image as a label and use it to help design the form.

Entry for the type of graphic:

@RECT
creates a rectangle

@CIRC
creates an ellipse

@LINE
creates a line

You can also set the stroke width of a line or outline.

Entry for the border style:

SOLID
simple lines

BUMP
3D embossed

HOLE
3D engraved

DITCH
edge only engraved

RIDGE
edge only embossed

Example: for a raised rectangle, enter @RECT2BUMP

More information: -> Graphics and images in forms


Images (forms only)

An image is displayed in place of the field title.

Syntax:

#filename

More information: -> Graphics and images in forms

Description

Verbose description of a field

attribute master attribute for field (T_FIELD)
type, entry string, entry optional
max. no. of characters 50
selection tool no
multilingual field yes

When users are editing a record and the cursor enters a field, its verbose description appears in the mask's footer. You should use the description to characterized the field in more detail or warn of potential invalid data.

Check String

String for validating data entered into a field

attribute master attribute for field (T_FIELD)
type, entry string, entry optional
max. no. of characters 50
selection tool no
multilingual field no

You can use validation strings to check the syntax of the data entered into a field, e.g. whether an article number complies with certain conventions. Validation strings consist of a series of validation characters.

Validation characters:

0
The character entered will be changed into a space character. If the position is pre-assigned by a character (Default value), this character is fixed to the position. If the pre-assigned value is shorter than the check pattern, a space character will be entered.

a
Capitals automatically changed to lower case, any character permitted.

A
Lower case automatically capitalized, any character permitted.

I
Capitals automatically changed to lower case, no special characters.

L
Lower case automatically capitalized, no special characters.

N
Only numerical characters.

X
X represents any fixed character. Any character entered will be automatically changed into the fixed character specified here. This process is case-sensitive, irrespective of whether the user presses the Shift key or not. Special characters are allowed.
With \X the meaning of check characters cease. They become regular characters and can be used as fixed characters.

>[validation character]
Placing > in front of a validation character requires that every character after the position of the validation character complies with the validation character.

Attention! The validation string may not contain spaces followed by further validation characters.

More information: -> Validating field entries

Default Value

Provides a field with a default value for when a record is created.

attribute master attribute for field (T_FIELD)
type, entry string, entry optional
max. no. of characters 50
selection tool no
multilingual field no

If the field is used in a mask, DataView automatically enters the default whenever a user creates a new record. The user may or may not be able to alter the default, depending on the field's access status.

Entry:

@DEFAULT
references a variable in the Default Data list. DataView writes the variable's value into the field, allowing it to be set independently of the user

@USER
enters the current user into the field

@GROUP
enters the current group into the field

@TODAY
enters the current date into the field - which must be of type DATE

Filename
Default graphic file for BLOB fields. This is the graphic displayed in forms if the database BLOB field is empty. The default graphic file must be stored in a folder on the server. The path may also be given.

More information: -> Automatically filling fields

Form

Opens the Field Data form for the selected record.

Mask Assignments

Opens the Mask Assignments form, which shows a table field's usage (display) within masks.