Data types dictionary

Classic Functionfunction codeGESATY

A data type is a code that describes the format and behavior of data elements such as properties in classes or representations, and columns in tables. Every dictionary describing data structures refers, for its elements, to data types.

This workbench function allows users to create and update data types. The data type dictionary already existed in version 6, but it has been extended to support the new features available in the class management.

When creating or updating a data type, it is necessary to enter information in several sections:

HeaderGeneralClassic informationClass information

See also Additional comments.

Header information

Contains information to identify the data type.

Code

Uniquely identifies the data type.

Description

Describes the class.

General information

The following information is defined in this tab:

Activity code

Used to protect specific classes during the standard patching process (if starting with X, Y, or Z), or to make them optional. It behaves similar to all the activity codes defined in dictionaries.

Module

Technical module the data type is associated with.

Internal type

Defines the internal data type as managed by the Sage X3 engine. This information is referenced in a local menu. The following choices are available:

Data typeUsage
Local menuAn integer value between 0 and 255. Used when bytes must be managed.
Short IntegerAn integer value in [ -32,768 to +32,767 ] range.
Long IntegerAn integer value in [ -2^32 to +2^32-1 ] range.
DecimalA decimal value with a precision given by the 'Length' parameter.
FloatingA single precision floating point value. The number of digits can be limited by the 'Length' parameter. This data type depends on the hardware in which the program is executed; therefore, its use should be limited to special cases (for example, if such a field exists in a database description).
DoubleA double precision floating point value. The number of digits can be limited by the 'Length' parameter. The same limitation for the Floating type applies.
StringA character string value. The maximum number of characters available is limited by the 'Length' parameter.
DateA date without time information.
Image fileA BLOB value. The detailed definition of the format is done in the 'Class' section.
Text fileA CLOB value. The detailed definition of the format is done in the 'Class' section.
UUIDA unique identifier.
DatetimeA date value including the time (managed independently from the time zone).

Length

Used for string and numeric data types:

LengthMemory sizeMaximum characters
01020510
120441022
240922046
381284094
N1024*(2^N)-4512*(2^N)-2

Local menu

When a data type is a tiny integer, it is usually attached to a local menu that gives a list of possible choices to input values in the user interface. This field relates to the local menu function.

Classic information

This section defines all the necessary information to support the Classic mode. The information presented was already in the version 6 data type dictionary, and will become deprecated when the Classic mode becomes useless.

Linked object

Defines the object code associated with the data type if it exists. This will allow the automatic switch from read-only pages mode to Classic mode to be done when a user requests a modification on a record displayed in a detail facet.

Linked table

Displays the main table associated with the Sage X3 version 6 object, if there is any.

Adonix format

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 located at the right of the ":" should figure in this field. Ex : 10X , 3A2B. The detail of existing syntaxes is given in the format version 6 documentation.

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

Grid format, parameter, and variable

Used to optimize the display of the large grids. If the grid format check box is selected, the variable format will be computed on every line. This is reserved for standard data types because it requires a particular process by the supervisor.

When this happens, the parameter fields represent the parameter code to enter in the data type screen management, and the variable represents the field that will be initialized by the parameter value in the 'before_entry' action of the bottom of the grid variable.

Default value

Default values proposed by default on the fields of that type.

Action grid

This grid is used to declare the actions predefined in the actions dictionary. For all fields having this data type, the actions defined will be systematically executed.

If a single action is defined for both the data type and the screen field, the actions will be executed consecutively and in the following order:

This grid allows you to define the specific actions associated with the field.

Action type

Defines the action type associated with the data type. The action types are:

Action typeUse
Before-fieldAction before any entry or display of the field. It can be used to define the format of the field.
Init_buttonUsed to define the button titles of the contextual menu.
InitUsed to initialize a field.
Before_entryAction carried out before each entry. It can be used to position the system variable 'mkstat' without having to enter it.
ControlUsed to test the validity of the field.
After-fieldCarried out after the control if it is valid. Used to assign or to display other fields.
After-modifCarried out after the control if it is valid, but it is not triggered unless the field has been modified.
SelectionTriggered by the F12 key.
Button 1Triggered by the F9 key and reserved for the tunnels.
Button 2 to 20The F4 key provides a list of contextual menus.
Before_lineOnly for scrolling on grids and used to do something whenever the line modification mode is started.
After_lineOnly for scrolling on grids and used to do something after each line entry.
ClickOnly for the icon fields. Used to trigger an action when clicking the icon.

Action code

Indicates 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.
Used to enter several actions for the same action type except for the "button", "icon", or "selection" actions. A title will be displayed just after entering the code.

Execution

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

Class information

This section defines the properties and behaviors used in the version 7 client. It includes the following information:

Type

Can be either Simple, Reference, or Rich Media:

Content type

This information refers to the content type dictionary, which defines a "mime type" associated with the data type. This is used by the communication protocol, and the codification follows the normalization rules.

internal typemime type
Local menuapplication/x-boolean
Local menuapplication/x-choice
Uuidapplication/x-string
Datetimeapplication/x-datetime
Shortintapplication/x-integer
Integerapplication/x-integer
Decimalapplication/x-decimal
Floatapplication/x-real
Doubleapplication/x-decimal
Charapplication/x-string
Dateapplication/x-date
Internal typemime type examples
Clbfiletext/plain, text/tab-separated-values, text/html, text/rtf, text/css, text/xml
Blbfileimage/jpeg, image/gif, application/msword, audio/midi, video/quicktime

A content type can be defined as "specifiable". The only content types specifiable are ATYPE9 (BLOB) and ATYPE10 (CLOB). For these types, the mime type will be dynamically changeable. This will be done by using the method ASETATTRIBUTE. The following example sets the mime type to application/msword:

 ARET=Fmet This.ASETATTRIBUTE(This.MYCLOB,"$contentType","application/msword")

Usually, the data attached to a CLOB or BLOB type of field is slowly loaded. A separate http request feed is sent to get the data, and the "content-type" property of the http header is filled with the corresponding value, so the browser can select the most relevant widget to display the content.

Supervisor management

This check box can be input only for the rich media types.

Format

This field is used to define dedicated formats for characters fields that carry automatic links. The choice can be:

Class

This field is filled when the data type is a reference to another entity. This will automatically generate all the controls related to the referential integrity.

Default Representations

These three fields are used when the data type is a reference to another class. It allows you to define default representations that will be used when a zoom from the field to a detail facet or a query facet is present.

Rules

This grid defines a list of rules and methods:

The description of the rules and methods is given in the following table. Note that they are called as Funprog and return an integer value that is not null if an error occurs. The first parameters are imposed and their name cannot be changed. They are called AINSTANCE, APRONAME, AFORMAT, and AVALUE.

General rules

Rule nameDescriptionMinimum parameter set expected
INITCalled every time an initialization method is triggered on the instance.The instance, the property name, and the value to be initialized must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable AVALUE : # The type depends on the Property
CONTROLCalled every time an update is done on the property. If an error appears, the property is not assigned and no other control is performed. Otherwise, the CONTROL rule associated with the property will be executed if it exists.The instance, the property name, and the value to be controlled must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable AVALUE : # The type depends on the Property
PROPAGATECalled every time an update has been done on the property. It allows to update other properties. The PROPAGATE rule associated with the property will be executed after, if it exists.The instance, the property name, and the value of the property must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable AVALUE : # The type depends on the Property
GETVALUECalled every time an access is done on the property. This can be especially useful if it slow loads the data. If the buffer is already filled, the value is directly returned; otherwise, a load is done from the database. The GETVALUE rule associated with the property will be executed after, if it exists.The instance, the property name, and the value of the property must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable AVALUE : # The type depends on the Property
FORMATCalled every time an assignment is done on the property before the CONTROL rule. This rule is dedicated to the control of the format conformity.The instance, the property name, the value of the property, and the format must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable AVALUE : # The type depends on the Property
Variable Char AFORMAT()

CLOB/BLOB rules

Rule nameDescriptionMinimum parameter set expected
AREAD_MEDIAPerforms the read operation (CRUD function on the class).The instance, the property name, and the value of the property must be sent:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable Clbfile AVALUE: # Depends on the Class
UPDATE_MEDIAPerforms the update operation (CRUD function on the class).The instance and the property name must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
INSERT_MEDIAPerforms the insert operation (CRUD function on the class).The instance and the property name must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
DELETE_MEDIAPerforms the delete operation (CRUD function on the class).The instance and the property name must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
READ_MEDIA_CNTReturns the media type (useful when displaying the right icon on the browser without accessing the content).The instance, the property name, and the media type must be defined:
Variable Instance AINSTANCE Using OBJECT
Value Char APRONAME()
Variable Char AVALCNT()

On this grid, the following information is entered:

Type

Describes the type of event (see the table above). Several lines can exist for the same event and the corresponding code will be executed in sequence.

Script

Defines the script in which the code corresponding to the event will be managed. The script might be generated in some cases and therefore will not be modifiable. For example, a control line is automatically added when a reference control on a class exists (the program control name is WMTYPxxxx, where xxxx is the data type).

Subprogram

Defines the name of the subprogram that will be called to handle the event.

Rank

Defines execution order when several lines exist for the same event.

Activity code

Used to protect specific events or to disable them according to the activity code value.

Active

Used to deactivate a standard event if set to No.

Parameters

This grid displays the list of parameters as they are described in the Funprog: the code, the data type, the class if relevant, the dimension and the mode used to transmit the parameter are displayed. The description can be changed. This parameter list will have to be filled when a property having this type is defined in a class or a representation.

Additional comments

Note that modifications done on the data type might have an impact on representations that have a link on a property having this data type.

This explains why entering in the dictionary on a representation can trigger an automatic update on the links. A message is displayed when this happens, and the user is invited to save the updated representation. The link on the representations is also automatically done when a patch is installed or the folder is revalidated.