Development > Data and parameters > Tables > Data types 

This function is used to define the data types that can be used in all the dictionaries where the data is defined: screen fields, table fields, report parameters...

A certain number of characteristics(internal type, length, actions...) are attached to a type to be automatically assigned to the fields using this type. It is not however necessary to define all the characteristics of a type. Indeed, the non-defined characteristics at the type level will be requested at the definition of the screen, which makes it possible to define the generic types. ADONIX delivers a certain number of data types containing only the internal type, that is to say the field storage type. These data types cannot be modified. Here is the list:

Type code

Definition

A

Alphanumeric string

ABB

Blob

ACB

Clob

C

Short integer

D

Date

DCB

Decimal amount

L

Long integer

M

Local menu

MM

Local menu with the possibility to filter the elements

 

  M or MM corresponding to a  local menu where the number is given by the contents of the Menu column in the table or screen dictionary. A local menu is a title table, entered either in the form of a combi box or in the form of radio buttons in the form of a check box (if it is local menu 1, which contains the values Yes/No). In the database only the choice number is stored in the list (0 if the field is not assigned, 1 if the first title in the list is selected and so on).

In the table shown below are displayed the data types corresponding to the supervisor technical elements:

Type code

Definition

ABS

Variable at the bottom of the grid

AT

Field indicating the blob type

AX1

Translated text (length 12)

AX2

Translated text (length 20)

AX3

Translated text (length 30)

W

Filler

  ABSidentifies the screen field at the bottom of the grid. This field is mandatory for all the grid section defined in a screen. If the grid will accept entries, this field will be in entry mode; if the grid is hidden, this field will be in hidden mode.

  W identifies a filler. This data type placed in a screen field will leave a space between the previous field and the next field, if theses two fields are on the same line. It is however preferable to use, to this end, the column section in the screen dictionary and to only use the fields with the data type W as a last resort.

  AX1, AX2, AX3 identify the translated texts. In fact, this field is not created in the database. Its field name serves to identify the translated text that will be stored in the dedicated table ATEXTRA.

Displayed in the table below is a list of the functional type that are particularly important (this list is not exhaustive):

Type code

Definition

MD1 to MD4

Formats for the amounts depending on the currency (which must be on-line): the 4 corresponding formats are defined in the currency table.

MC1 to MC4

Formats for the amounts depending on the currency: These are the same types as above, but they are optimised for use in a scrolling grid in which a column is entered with a currency that does not depend on the current line.

MS1 to MS4

Amounts in the site currency

ADI

Code stored in a miscellaneous table (where the number is given in the table dictionary, by the link expression).

HM

Hour: minute

QTY

Quantity

QT1 to QT5

Optimised quantity for the grid section (same notes as above: the format of a column must not depend on the current line)

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Fields

The following fields are present on this tab :

 

  • Description (field ZINTITTYP)

 

Close

 

Tab General

Fields

The following fields are present on this tab :

Characteristics

The validation of the ADONIX folder does not update the data types where the activity code begins with X Y or Z.

  • Module (field MODULE)

Module belonging to the setup. This field is used to specify whether the screen has to be created in the folder database or not. It is specified when the module linked to the screen is active in the folder.

Type

  • Internal type (field TYPTYP)

Used to indicate the internal type of the data type. The possible types are:

  • Alphanumeric: character string with a maximum length of 255 characters, where the length can be given in the corresponding section. If the length is not given, it will be given by the length of the field at the time of using the type.
  • Local menu: integer between 1 and 255.
  • Short integer: integers between -32768 and 32767.
  • Long integer: Integers between -2^31 et +2^31-1.
  • Decimal: This is a numeric field with up to 32 significant figures, whose length is given in the form N.M (N being the number of figures before the decimal point and M being the number of figures after). This length can be given directly at the level of the type or in the length field defined at the level of the field that will use this type. According to the database, this type of field can be stored in the floating or fixed form in the database. In the first case, which corresponds to Oracle: in this case, what counts, when a N.M format is defined is in reality the total precision of the storage – N+M – . The second case corresponds to SQLServer: the number of positions before and after the decimal point must be clearly defined. The format field (which can be variable) will then define more precisely the distribution of the figures between the whole number section and the decimal section.
  • Date: this is the date comprised between the 1st January 1600 and 31st December 9999 (remembering that a null date symbolised by [0/0/0] exists).
  • Blob: it is used to store and manage the images.
  • Clob: it is used to store in the database variable length texts with the format "rtf" or "txt" and to manage them.

For the blobs as with the clobs, it is necessary to enter the length that will be maximum storage length. The coding is as follows:

Length

Memory size

Maximum characters

 0

 1020

 510

 1

 2044

 1022

 2

 4092

 2046

 3

 8188

 4094

n

 1024*(2^n) - 4

 512*(2^n) - 2

  Floatingand Double are the types that will not be recommended for use (formats linked to the machine).

  • Length (field LNGTYP)

Used to indicate if necessary, the length of the character strings or the numbers. If this is 0 the length will be entered for each variable of this type.

  • Local menu no. (field NOLIB)

Local menu number. If this is 0 it will be entered for each variable of this type.

Format

  • Adonix format (field FORTYP)

Used to indicate the "adonix" format of the data type.  This format must be coherent with the internal type. The format must conform to the Adonix syntax. Only the part situated to the right of the ":" should figure in this field. Ex: 10X , 3A2B. The detail of existing syntaxes is given in the corresponding documentation.

For a variable format, it should be preceded by "=". Ex: =[F:DEV]FM92

A good example of this type of variable format can be viewed with the MD1 to MD4 types. These formats are used for the amounts expressed in a currency. For MD1, the format =GDEVFMT. This global variable is loaded in the INIDEV action declared in this same data type.

 
  • Options (field OPTION)

These options are realized by characters that can be concatenated when several options are required. It is possible to choose these options thanks to a selection window. A detailed description for all the possible options is available.

Close

 

Tab Convergence

Fields

The following fields are included in this window :

Object

Used to indicate if necessary, the object associated with the data type. The linked table managed by the object is displayed.

The presence of an object code automatically starts:

  • The existence control
  • The selection and advanced selection windows
  • The possibility of a tunnel to the object management
  • The possibility to display the current entry properties of the object.

 

Format

  • Grid format (field OPTTAB)

Used to optimize the display of the large grids. This is reserved for the data type of the standard, because it requires a particular process in the supervisor.

  • Parameter : represents the parameter code to enter in the screen management for the data type.
  • Variable : represents the field that will be initialised by the parameter value in the before_entry action of the bottom of grid variable.

 

  • field W1

 

  • Variable (field VARTAB)

Used to optimize the display of the large grids. This is reserved for the data type of the standard, because it requires a particular process in the supervisor.

  • Parameter : represents the parameter code to enter in the screen management for the data type.
  • Variable : represents the field that will be initialised by the parameter value in the before_entry action of the bottom of grid variable.
  • Default value (field VALDEF)

This field allows you to enter a calculation formula to assign a default value to fields of this type

An example can be seen in the CRY type, which defines the country code : the GPAYS variable, which defines the local country, is proposed as the default value for all the fields of this type. This default value is automatically proposed in the screen fields using this type of data. However, if a field using this data type has its own default value in the screen, it's this that will be used; in this case, the default value for the data type is ignored.

 

Grid Actions

  • Type (field ACTTYP)

This grid is used to declare the actions catalogued in the actions dictionary. The objective is that for all fields having this data type, the actions defined here will be systematically executed.

If a single action is defined is defined for both the data type and the screen field, the actions will be executed consecutively and in the following order : it is the data type then the field. There is a particular case for the "selection" and "button" actions, for which only the screen field action will be executed.

This grid makes it possible to define the particular actions associated with the field. The possible action types are :

  • Before-field : Action before all entry or display of the field. It can be used, for example, to define the format of the field.
  • Init_button : used to define the button names in the contextual contextual.
  • Init: Used to initialize a field.
  • Before_entry : Action carried out before each entry. For example it can be used to position mkstat and so not enter it.
  • Control : Makes it possible to test the validity of the field.
  • After-field : Carried out after the control if this is valid. Makes it possible for example to assign or to display other fields.
  • After-modif : Ditto but is not started unless the field has been modified.
  • Selection : Started by the F12 key.
  • Button 1 : Triggered by the F9 key (reserved for the tunnels)
  • Button 2 to 20 : The F4 key makes it possible to have a list of contextual menus.
  • Before_line : Uniquely for the scrolling menus, making it possible to so something each time line modification is started.
  • After_line : Uniquely for the scrolling grids, making it possible to do something after each line entry.
  • Click : Only for the icon fields

Indicate the actions to be carried out in a systematic manner on the type of data.
The actions STD, SPE or SPV that are linked to a particular function will not be entered at this level.
It is possible to enter several actions for the same action type except for the "button" or "icon" or "selection" actions

  • Execution (field EXEACT)

This field is used to define the context of the action execution :

  • Interactive : on-line entry.
  • Import / Web service : loading of the record web service or import mode. The execution of the actions on the fields is carried out when all the fields are entered.
  • Always : in all cases.

Tab Class

Fields

The following fields are included in this window :

Type

  • Type (field TYPSELSYR)

 

Details

 

  • Description (field PROTYP)

 

  • Supervisor mgmt (field SUPFLG)

 

  • Special format (field FMTPROSYR)

 

 

Default representations

 

 

 

Grid Rules

  • Type (field TYPRUL)

 

  • Script (field TRTRUL)

 

  • Sub-program (field PRGRUL)

 

  • Sequence (field ORDRUL)

 

 

  • Active (field ENARUL)

 

Grid Parameters

  • Code (field PARCOD)

 

  • Description (field ZPARTIT)

 

  • Key (field PARCLE)

 

  • Type (field PARTYP)

 

 

  • Dim. (field PARDIM)

 

  • Method (field PARMOD)

 

Close

Action icon

Reference control addition
Update parameters

 

Close

 

Reports

By default, the following reports are associated with this function :

 ATYPE : Data type

This can be changed using a different setup.

Specific Buttons

This button is used to update and compile the WWGLOBLON process. In this process, for each alphanumeric data type a global variable of the shortint type contains the entry length for the data type. These variables are named GLONxxx ( xxx = data type). These variables will be used during the definition of the work variables linked to a data type in the process. This is used to alleviate the problems linked to a modification of a data type length.

Example of the use of these variables :
# work variable for the Product reference
Local Char WITEM (GLONITM)
WITEM = [F:ITM]ITMREF  

The following fields are included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Use this field to define the folder from which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

  • All folders (field TOUDOS)

Use this option to copy the record to all the folders defined in the dictionary (ADOSSIER table of the current solution).

  • To folder (field DOSDES)

Use this field to define the folder to which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

Close

This button is used to copy the data type definition to another folder.

Menu Bar

Documentation / Paragraphs

This menu item allows access to the documentation management on the first paragraph of the documentation (if there is one) associated with the current record.

Documentation / Links

This menu item allows access to link management. It is used to define the links between the current record and other records (for example, the links between functions and parameters). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu item launches a documentation generation. You can also launch it from the Generation button at the bottom of the screen.

You can launch three types of generation one by one or simultaneously

  • The generation of the documentation structure from the dictionary (ADOCUMENT, ADOCBLB, and ADOCCLB tables)
  • The generation of the documentation from the previous tables
  • The generation of the field documentation

The range suggested by default takes into account the current record, but you can modify it at launch time.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Incorrect length

The length associated with a field is incompatible with the given internal data type.

Local menu not defined

The local menu number is incorrect

Invalid character

Incorrect characters have been entered in the format.

Incorrect format

The format that has been defined is invalid.

Incorrect option

The option associated with the format is invalid.

Data type not modifiable

The database data types are not modifiable. Example : "A","C","D","L","M","MM","DCB","AV","W","ACB","ABB".

Tables used

SEEREFERTTO Refer to documentation Implementation